Reliable Methods of Rectifying Error Establishing a Database Connection

Error Establishing a Database Connection

Step 1: Reinstall the Regular WordPress Files 

One of the major reasons behind Error Establishing a Database Connection in WordPress is the corrupted WordPress core file. 

It might be possible that someone has tried to hack your website. Maybe you have edited some files mistakenly, or might be it is because of plugins issue.

If it does, then you should reinstall the default WordPress file. You can do that by downloading a new version of WordPress and upload it to your site.

Step 2: Test out Credentials of Your Database Connection

There is a need for a username and password to make a connection to the database. Generally, users who use these credentials usually don’t change them. However, you can find some awkward events after doing any edits to your website file, the hosting servers, and others. Sometimes mistakenly or deliberately change credential makes “error establishing a database connection” occurs.

You can rectify this issue “wp-config.php” file.

Step 3: Ensure your Database hasn’t Been Damaged

Despite being an excellent forum for websites and blogs, WordPress has a complicated database. Several fine mechanisms need to be in sequence to stay away from the issue. But often, something goes out of portion, and here you get Error establishing a database connection.

The most prominent thing is to navigate to your WordPress dashboard – abc.com/wp-admin

If you receive a similar error “error establishing a database connection,” leave this step.

WordPress White Screen of Death

And if you see other issues, then you need to concentrate on what WordPress recommending you should attempt. The latest version, WordPress, has given many problems solving processes, so it would be helpful to do as per WordPress instructions. Not only sometimes, but users also face WordPress White Screen of Death error where they see a blank white screen. Solve issues as per guidelines given by WordPress help desk.

Ensure themes and Plugins Haven’t Been Damaged

It might be possible that maybe one of the site’s themes and plugins have been damaged. Go to WordPress admin of the website. Search for plugins and deactivate one by one. Similarly, then you should also check your theme and disable and reinstall the default theme. Activate plugin one by one, and then you will find that the corrupt one. It will help you in fixing the database connection error.  

Interact with Web host provider continuously. 

When you find that website was functioning for a couple of moments before and now it is not working, then it can be Error from hosting provider. Contact your host provider and ensure there is something wrong from his side. They will solve Error accordingly.

Source URL:

Published by wperror500

A professional Web Development & Designing with more than five years of experience. We are here to help! If you are facing any type of errors at your WordPress site.

Leave a comment

Design a site like this with WordPress.com
Get started