“Error establishing a database connection” Mainly this error occurred due to any one of the plugins got cracked. During the time of auto update. You can see the error by go to the error log folder in the file manager. For that open c Panel if the c Panel is accessible then you can confirm that the host is working properly
Page Contents
Error establishing a database connection
This either means that the username and password information in your wp-config.php
file is incorrect or we can’t contact the database server at localhost
. This could mean your host’s database server is down.
- Are you sure you have the correct username and password?
- Are you sure that you have typed the correct hostname?
- Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably
contact your host. If you still need help you can always visit the WordPress Support Forums.
If you have been browsing the web for some time, at least you have seen this error several times. The error in establishing a database connection is one of those curses that can be caused by several reasons. As a WordPress beginner, this can be very frustrating, especially when it happens alone without changing anything.
How to Fix Error establishing a database connection
Steps you have to follow to fix this error
Try open c Panel from you host part, if the c Panel is accessible with your credentials then you can confirm that your host is working properly.
- Check your website Database and double check the MySQL username & password showing correctly what you entered while you hosting the website.
- Check Error log. There you can see what error causes for you website down. For that go to file manager> expand home> click on public_html> and find error_log.
View error_log by right clicking on it> view
Scroll down if you see any error of you installed plugin, Rename the folder of that plugin, for that
Open wp-content> click on plugins
Find the error shown plugins and rename the folder over there
- Also Check error log on to wp-admin, for that click on wp-admin and find error_log and right on it > view
Scroll down if you see any error of you installed plugin Rename the folder of that plugin, for that
Open wp-content> click on plugins
Find the error shown plugins and rename the folder over there
Then try open your website url on browser. Hope this fix will workout to load your website normally.
If it doesn’t work rename back to the original name of that
folder.