Please help! Error establishing a database connection

Posted November 17, 2019 796 views

I do not change anything about database. Error detail said :

“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 you have typed the correct hostname?
Are you sure 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.”

i am sure have correct username, password and hostname, because i don’t change it

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hi @herlanjafa,

From a problem with the database to just wrong configuration of your wp-config.php file. Luckily, there is a good article just for these occasions here at DigitalOcean - Article.

Please follow up the article and see if you’ll be able to resolve the matter. If you don’t we can follow up on that from there.


by Brian Boucheron
WordPress is one of the most popular open source content management systems in the world. Although it started out focused on blogging, over the years it has developed into a more flexible platform for websites in general. After almost fifteen years of development it is quite polished and robust, yet issues can still come up. If you've recently attempted to load your WordPress-powered website and instead saw a message stating "Error Establishing Database Connection", the cause is most often...
Submit an Answer