February deal
Free .co.uk or .uk domain with Standard or Pro yearly hosting.View offer →
← Back to Help CentreUpdated Jan 2026

WordPress

Fix “Error establishing database connection”

Restore your site quickly when WordPress cannot reach the database.

7 min read

Quick answer

Restore your site quickly when WordPress cannot reach the database.

  • WordPress works best with a clean theme, minimal plugins, and caching enabled.
  • Regular updates keep your site secure and compatible with modern browsers.
  • Backups before updates prevent small mistakes from becoming big problems.

Key details

This error usually means your database credentials are incorrect or the database server is temporarily unreachable.

Most of the time, it is fixed by checking the wp-config.php file and confirming the database name and password.

If you are not comfortable editing files, our support team can help.

Step-by-step

  1. Open File Manager and locate wp-config.php.
  2. Confirm DB_NAME, DB_USER, and DB_PASSWORD match your database.
  3. Save and refresh your site.

Quick checklist

  • Install LiteSpeed Cache
  • Update themes and plugins monthly
  • Back up before major changes
  • Remove unused themes and plugins

Was this helpful?

Tell us what you need and we will improve this guide.

Related guides