“Error Establishing A Database Connection”-WordPress

What to do if you have wordpress error message which is :”Error establishing a database connection”.

Yesterday, I was in the middle of checking my dashboard and when i refreshed my admin page, my screen was suddenly white and showing this database error message.

This has never happened to me before, and i was then, of course panic.


The error message looks like the following image:

The error message that appears on the blank page.

I started to backup my wordpress database from my phpMyAdmin, and start to do some google researches about it too. Luckily a few minutes later, my blog comes back online again.

Here are some steps what i did when i got this database error:

1. I tried to be not panic, but of course i was. Can’t help it, i have lots of posts already, and do not want to loose anything. So i did a quick database backup before i could think of something else.

2. I was so sure that my database name, password, localhost were all correct. So i didn’t even touch my wp-config.php.

3. I tried to settle down, and wait for a few minutes, planned to contact my host, but i just have waited.

4. Finally after a few minutes later, my blog was back to normal again. I didn’t do anything, i have just waited.

Summary: If you have this problem, and you are sure you didn’t edit wp-config.php file, then i would just wait for a few minutes or hours (24 hours).   In my case above, imagine, if i changed something, it would mess up my blog instead of fixing. So i would recommend you wait until the next day, and if  it still happens, i would contact your webhost.

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page