Condition
Instead of your site, WordPress shows only the text "Error establishing a database connection".
Cause
WordPress can't reach its database. Usually the settings in wp-config.php don't match the database, often after a password change or a move. Sometimes the database server was briefly busy.
Remedy
- Wait a minute and reload. If the site comes back, the database server was briefly busy.
- Compare the settings: open
httpdocs/wp-config.phpin the Plesk file manager and look atDB_NAME,DB_USER,DB_PASSWORDandDB_HOST. In Plesk, open Databases: the name and user must match. If you changed the database password, put the new one inDB_PASSWORD.DB_HOSTis almost alwayslocalhost. - Repair the tables: in Plesk, open Databases, then phpMyAdmin for the database, select all tables and choose Repair table.
- Nothing helps? Go back to a restore point from before the error, or open a ticket with the priority Urgent: we check the database server.