Solved – Error Establishing a Database Connection wordpress

Error establishing a database connection.

This is the common issue for a WordPress site while porting from local to live or migrating from one host to other.


  1.    Your login details for your database are wrong.
  2.    Corrupted Database


Check Database name and user

Check Phpmyadmin whether the database imported correctly.


Check the wp-config.php, has the same database name and user, also check the password provided for user

If the above point doesn’t work, then create a new DB and import the existing database..



Add a Comment

Your email address will not be published. Required fields are marked *