Wordpress : Error Establishing Database Connection

1. Check Your WordPress Database Credentials

The most common reason for database connection error in WordPress is incorrect database credentials.

Your WordPress database credentials are stored in the wp-config.php file. It is the WordPress configuration file that contains important WordPress settings including database information.

You’ll be looking for the following lines in the wp-config.php file.

You need to make sure that the information for the database name, username, password, and database host is correct.

a. Simply log in to your hosting account and click on MySQL databases under the database section.
b. This will take you to the database management page in your hosting dashboard. From there, you can find out your database name and the username.
c. Once you have confirmed your database name, username, and password, you can change that information in your wp-config.php file if needed.

2: Check If Your Plugin or Theme Files Haven’t Been Corrupted

3: Check If Your Database Hasn’t Been Corrupted

Was this answer helpful? 0 Users Found This Useful (0 Votes)