Sunday 1 January 2012

Tips on resolving Error establishing a database connection - WordPress

This problem should be very rare in a blog that is already running fine and there were no major changes done to it. I can only think of a few causes:

  1. Someone change your wp-config.php
  2. Your MySQL database is screw up
  3. MySQL service is not running.
For the first two causes, it will usually mean that your site is hacked. It is unlikely that your webhost screw up your files. The most probable cause is the last one.

A sure way to check is to go to WHM and check MySQL service. I'm not sure if cPanel shows. I had problems restarting the service a few times.

TIP: Using a cahce plugin like Total Cache or Super Cache helps to alleviate the problem since it will still show the cache post/homepage rather then a homepage showing "Error establishing a database connection". This will give you enough time to resolve the problem.


     here are some tips on how I resolve the error.

    No comments:

    Post a Comment