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.
Related articles
- Update WordPress, themes and plugins safely Keep WordPress current, the best single protection against hackers, without breaking your site.
- Restore your site from a backup Bring back a deleted page, a broken update or lost files from one of your site's restore points.
- Common errors and what they mean Quick answers for the error messages and problems customers meet most often.