Skip to content
Less than 1 minute Minutes

The Error Establishing Database Connection error indicates that the connection between your website files and the database has dropped.

1. Check your wp-config.php database details

Open your wp-config.php file and verify these details are correct:

  • DB_NAME – The name of your database
  • DB_USER – Your database username
  • DB_PASSWORD – Your database password
  • DB_HOST – Your database hostname

You can find the correct details in MyMultidata under Manage Hosting > Options > Manage > MySQL Databases.

2. Repair a corrupt database

If the credentials are correct but the error persists, your database may need repairing. Add this line to wp-config.php before the line ‘That’s all, stop editing!’:

define('WP_ALLOW_REPAIR', true);

Then visit https://yourdomain.com/wp-admin/maint/repair.php and follow the repair wizard. Remove the line from wp-config.php afterwards.

Alternatively, you can use WP CLI via SSH: wp db repair