If they match, there’s nothing to do here. Now, ensure that the username and password match with those in the following two entries in the wp-config.php file. In case of any doubt, just ask your hosting provider for the database username and password. If you’re using a custom panel like Dreamhost (which we are), then the database details like username and password will be listed under the Manage Database tab. If you’re using cPanel then the database username will be listed under the Databases tab. The database username and password in wp-config.php should also tally with the actual username and password. Related: WordPress Database Management and Optimization Guide If not, make the correction and save the file. Once you log in to the MySQL panel, you can see your database name on the left panel just below the information_schema.Īlternatively, you can click the Databases tab on the top to know your database name.Įnsure that the name matches the one in the wp-config file. To know your database name, you can either ask your hosting provider or you can access your MySQL database using your hosting panel. The ‘Name’ should match with your database name. There are 4 important things to verify here: If there is any error here, it can throw up the database connection error. The wp-config.php file contains the details of your WordPress database. You can now return to editing the wp-config.php file. Now create a text file with some name like wp-config.txt on your computer and paste the copied contents. So, open the file and copy all the contents of the file. Before tinkering with this file, you should backup all its contents. Now scroll down to the wp-config.php file. If you can see the folders wp-content, wp-includes, and wp-admin, you are in the right place. Next, navigate to the directory where WordPress installed. You can use either an FTP program like FileZilla or a file manager in your hosting panel to access your WordPress directory. This file is located in your root WordPress installation. The most common reason why the database connection error occurs is due to wrong credentials in the wp-config.php file. If there is an error in your database, WordPress will not be able to communicate with the MySQL server and will throw up a database connection error that we will troubleshoot below. WordPress retrieves all the information it needs from the MySQL server constantly. The media files and other uploads are not stored in the database but are stored in the wp-content folder separately.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |