Error establishing a database connection - WP host changed password


I changed my SQL password through my webbhost. After that I found out that I couldn't enter my website anymore. I'm 99% sure it has to do with the login credentials. So I was searching around on the internet and found the define('WP_ALLOW_REPAIR', true);-code but that didn't helped me. I also tried to replace the following in my wp-config-sample.php:

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');`

Another strange thing I found out is there is 2 folders. One wp-config.php and another one where all the credentialinfo is called wp-config-sample.php. Maybe it doesn't matter. Is there anyone who had a similar problem and fixed it or someone who could help me?

Show source
| php   | database   | mysql   | wordpress   2017-01-02 14:01 1 Answers

Answers ( 1 )

  1. 2017-01-02 14:01

    The active config file is wp-config.php. The file wp-config-sample.php is only a sample file and is there in order to help set up configuration manually.

    With that said, if the accurate and current credentials are not updated on the wp-config.php file, it will be impossible to establish DB connection.

◀ Go back