Error : Error establishing a database connection.

Reason : The WordPress is unable to communicate with its database



If previously your WordPress website was working normally, clearly something has changed to break the link between WordPress and the database.
Possible causes could be:
• The database server is down.
• Too much traffic.
• Incorrect login credentials.
• Corrupted WordPress files/ database
If this is the first time you’ve tried to use WordPress, the most likely cause is that your database credentials are incorrect or have changed. Use the following steps to troubleshoot the issue.

Log in to your cPanel > File Manager > Navigate to your WordPress folder.
Check the database credentials in your wp-config.php file > Edit.



You’ll see your database credentials listed under MySQL settings. Check that the database hostname, database name, database usernameand password are correct.



You can find your database credentials at cPanel > Databases MySQL Databases.



You may reset the password as per below :



Make any necessary changes in your wp-config.php file and ensure the password and username is correct, then click Save Changes to proceed.
Try to access WordPress once again to see if your issue remains, please check the Plugin or Theme Files and ensure it haven’t been corrupted by rename the Plugins folder. Repair your database and try also change the wordpress theme to Wordpress default theme. If you have make any changes recently before the issue persist, kindly contact our support team for restoration from available backup files.
Was this article helpful?
Cancel
Thank you!