Error Establishing Database Connection

How to Fix Error Establishing Database Connection in WordPress

Having a problem Fixing Error Establishing Database Connection with the WordPress database? This error may happen because of many reasons and sometimes it’s very frustrating to fix this error. We got this same error few days ago on our own site and It took a little over 10 minutes to detect and fix the problem. Sometimes a bad plugin might be a nightmare. I used below techniques to fix this error establishing a database connection in WordPress. Why you’re getting this Error Establishing Database Connection? We encountered this error because WordPress is incapable to reach the database. This may happen because of the following reasons: 1. A bad plugin corrupts the database. 2. Wrong Credentials on the wp-config.php file. Wp-config is a PHP file that we can easily edit with FileZilla. 3. The website has been moved to a new web host. Let’s discuss all the reasons one by one. 1. A bad plugin corrupts the database. To troubleshoot this error, we’ve to find the problematic plugin. Go to plugins and click Installed Plugins. deactivate the WordPress plugins one by one and find the problematic plugin. For this purpose, go to the Admin Dashboard and from the Left side bar…