Website Without PHP
English (United Kingdom)GB
  • English (United States)
  • English (United Kingdom)
  • Dutch (Netherlands)
  • Dutch (Belgium)
Menu

WordPress Database Connection Error: What to Check

Error establishing a database connection means WordPressWordPress is free software for building and editing a website in your browser. It is written in PHP, so it builds each page when someone visits. cannot reach its database.

Get help with your website

More about this

Common causes are incorrect settings in wp-config.phpwp-config.php is the file containing basic settings for a WordPress installation, including its database connection., a stopped database server or a hostingWeb hosting is the service that keeps your website's files on a computer that is always online, so visitors can open your site at any time. problem.

Error

What the message means

WordPress stores pages, posts and settings in the database. Without a connection, it cannot load them. The public site and administration area may show different messages, but both need the database connection.

Common causes

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

The database name, username, password or hostname may be wrong after a migration or password change. The database server may be unavailable or overloaded, the database damaged, or the hosting account at a resource limit.

How to check safely

Back up whatever you can still access. Open wp-config.php through the host's file manager and compare the connection settings with the hosting panel. Never publish this file or paste passwords into a chat or forum.

What you can try

Correct settings that do not match. Ask whether the database server is running and whether other sites are affected. If the settings are correct but the error remains, ask for a database integrity check or recovery.

Change passwords in the hosting panel and update the matching value in wp-config.php.

After a PHP version change

The new configuration may lack a database extension such as mysqli. Ask the host to check that required extensions are enabled. Check supported PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. versions before choosing a version.

Preventing another failure

Keep credentials in a password manager and update the site configuration immediately after a password change. Check the hostname after moving servers. Keep database backups outside the server and test recovery.

Watch storage warnings: a full disk can stop the database.

When to get help

If recovery fails or data may be missing, get help before making further changes. A person replies within 1 working day. Emergency repair starts from £315, excluding VAT.

Frequently asked questions

What does this mean?

Error establishing a database connection means WordPress cannot reach its database. Common causes are incorrect settings in wp-config.php, a stopped database server or a hosting problem.

What should I check first?

Back up whatever you can still access. Open wp-config.php through the host's file manager and compare the connection settings with the hosting panel. Never publish this file or paste passwords into a chat or forum.

When should I ask for help?

If recovery fails or data may be missing, get help before making further changes. A person replies within 1 working day. Emergency repair starts from £315, excluding VAT.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.