Skip to content

Fix a WordPress Database Connection Error Print

  • 0

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

  1. Note when the problem began and whether it followed a migration or password change.
  2. Back up wp-config.php before editing it. Keep the backup outside the public website folder.
  3. Compare DB_NAME, DB_USER, DB_PASSWORD and DB_HOST with your actual hosting database details. Account prefixes are part of the names.
  4. In cPanel, confirm the database exists and the specified user is assigned to it with the application permissions.
  5. 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.


Was this answer helpful?

« Back

Cookie Policy · Privacy Policy