The message Error establishing a database connection means WordPress cannot reach its database using the current settings. It does not, by itself, mean your content has been deleted.
Check the connection details
- Note when the problem began and whether it followed a migration or password change.
- Back up
wp-config.phpbefore editing it. Keep the backup outside the public website folder. - Compare
DB_NAME,DB_USER,DB_PASSWORDandDB_HOSTwith your actual hosting database details. Account prefixes are part of the names. - In cPanel, confirm the database exists and the specified user is assigned to it with the application permissions.
- If you reset the database user's password, update every application using that user. Save the configuration and test again.
When to contact support
If the settings are correct, contact AnyKey support to check database availability, service limits or table errors. Send the domain, time of failure and recent changes. Never send your database password or an unredacted configuration file.
Avoid deleting databases, recreating users or enabling public repair scripts as a first step. If repair is needed, agree a backup and recovery plan before making changes.