- Plesk for Linux
- Plesk for Windows
A WordPress website shows the following error in a web-browser:
PLESK_INFO: Error establishing a database connection
MySQL service is running on the server.
When clicking on the Log In button in Plesk at Domains > example.com, the following error message appears:
PLESK_ERROR: Error: 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:3306`. This could mean your host’s database server is down.
ORThe WordPress instance appears as broken and "/httpdocs" is shown instead of an actual WordPress name at Domains > example.com > WordPress.
A username/password of the WordPress database specified in the domain's wp-config.php file do not match the actual username/password stored in MySQL.
In Plesk, go to Domains > example.com > File Manager and open the wp-config.php file.
In this file, find the correct username/password and copy them:
CONFIG_TEXT: /** MySQL database username */
/** MySQL database password */
DB_HOSThas IP of different server set correct password for WordPress user on that server.
Then go to Domains > example.com > Databases > User Management > click on the WordPress user defined in the wp-config.php file (If it does not exist, create a new one) and update the password taken from the previous step. Once done, apply the changes.
Check website availability.
If the website starts to show the "400 Bad request" error, apply the following actions:
Reset a database user password in Plesk at Domains > example.com > Databases > User Management.
Update a DB_PASSWORD value in the wp-config.php file at Domains > example.com > File Manager with the new password set up in the previous step.