“Error establishing a database connection” in wordpress Site

“Error establishing a database connection” in wordpress we quite often find this problem.

Most of the newbies get worried after finding that error on their wordpress website even it is something not very much desasteroud.

What could be the reasons behind Error establishing a database connection in wordpress site.

1. Most probably the details of your database like DATABASE NAME, DATABASE USER or DATABASE PASSWORD are mismatched with the details you have in the file wp-config (you can find that file in your hosting main folder usually public_html).



How you can check and verify that issue?

Step1.

Simply open the page of your databases from where you create or manage databases in your hosting control panel, get all the credential like database name, user and password from here (if you have forgotten the password of user, you may delete the user and create the same again and attach with the related database with all permissions)

Step2.

Now open your file manager or FTP and download wp-config.php file in case if your are dealing with wordpress or in other cases you may have to download your web configuration file on your local system, then open that file through NOTEPAD, here you can find whole the information about your database, you may match that information with those credntials you provided while creating database and username, if some thing you found mismatch, edit that accrding to the info you set while creating database.

once you made changes accordingly save that page and upload again.

Then browse your site again, hopefully it will work for you.



Other issue for this error could be

2. Database server is down due to huge load on the server (You must contact to your hosting services provide)

Add a Comment

*