How To Fix ‘Error Establishing A Database Connection’

October 4, 2018

Many website owners have seen this familiar error establishing a database connection, and it is one of the worst issues you can run into if you have no experience dealing with the issue.

There are many solutions to fixing this problem, but the question you may be asking yourself is — which solution will help me the quickest?

Here’s a quick list of things you can do immediately to fix the error:

The error means that WordPress had an issue connecting to your database. Your database could not be responding correctly or it could be something much more simple.

Have WordPress Automatically Fix It

Access your wp-config.php file and paste this into the file then save.

define('WP_ALLOW_REPAIR', true);

Once you’ve done this go to your website and visit this link

For a quick repair click “Repair Database”

This function enables WordPress to try an fix the issue with the database on it’s own. If this method does not work try another solution.

Check your wp-config.php file for the correct information

The issue could be as simple as you or someone changed the password to the database. Double check everything and make sure all is correct.

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');

There are numerous of reasons as to why you could be receiving this error. The helpful methods above are sure ways many people have fixed the issue, including myself.

About Author

Download all of our exclusive theme's for one low price

A one time fee of $50.00 for lifetime access.

$100.00Purchase Membership