I am getting the error: Error establishing a database connection. I go to localhost, and it brings up the wampserver homepage (I am using wamp obviously) I click on my project which is called wordpress-first and it just says this site cant be reached. if I go to localhost/wordpress-first it gives me the error establishing a database connection. I documented every step I took because I had a feeling I was going to have an issue. So here is the steps that I took installing WAMP, wordpress and filezilla.
downloading wamp
• Download wampserver from wampserver.com/en/
• Following this video: https://www.youtube.com/watch?v=StfQetPz2og&t=9s
• Downloaded wampserver.3.1.3.exe and the read me and pdf of how to install.
• Moved the exe. File into my c drive
• Moved readables into a folder in documents
• Installed the exe. For wamp in c drive
• I changed the default browser from IE to chrome upon setup
• Notepad was chosen as the text editor
Mysql5.7.21 was installed
Once installed I clicked on the wampserver desktop icon. The command prompt opened and then closed immediately. I went to the bottom right of my screen and clicked on the W icon in the notifications section where the volume control is. I clicked into the wamp icon. I clicked start and services and it started PHP Apache and all that. I went to localhost and opened the WAMP homepage.
• Click on phpMyAdmin to create a database
As a default the username is root and there is not password. Just leave it blank to begin with.
• Click on databases
• Go to create database. Name it whatever you want. I named it wordpress_first.
• I clicked create and a prompt appeared telling me the database has been created.
downloading wordpress
• I downloaded the wordpress 4.9.8 zip file.
• I extracted the files in my downloads folder.
• Then move your wordpress folder in the wamp folder so in c / wamp / www
• Next, I renamed the file from wordpress 4.9.8 to wordpress-first, the name of my database
• I went into the wordpress-first folder and found the wp-config-sample.php file. I made a copy of this file in the same folder and renamed it as wp-config.php
• I opened this file in atom
• There are functions in this file that look like this define(‘DB_NAME,”database-name-here”);
• I changed the second parameter in database name to wordpress-first
• I changed the second parameter in user name to root
• I changed the second parameter in password to “” for no password
• You can now see the new-folder on the WAMPSERVER homepage in localhost/ and it is called wordrpess-first
I clicked on the folder in localhost and got the error This site can’t be reached wordpress-first’s server IP address could not be found. If I type in localhost/wordpress-first it gives the error Error establishing a database connection
• Went to this site for help https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/
• Theres a video that said to go into your wp-config file and after the line that
s all stop editing! Happy blogging. – add this line of code: define(‘WP_ALLOW_REPAIR’,true );<br>
• This didn
t work, another thing they said was that I need an FTP client and that WAMP doesn’t come packaged with this. So I went to this site.https://www.betterhostreview.com/setup-filezilla-ftp-server-wamp.html where they have a tutorial on downloading filezilla, an FTP client for windows.
Filezilla
- During the filezilla installation process:
• There was a prompt for the port number and I clicked on the default one that popped up which was 14147.
It then said error: Connection to server lost…
You appear to be behind a NAT router. Please configure the passive mode settings and forward a range of ports in your router.
Warning: FTP over TLS is not enabled. users cannot securely log in.
I don`t know what to do at this point so if anyone has any suggestions I would appreciate it thanks!