πŸ”΅
WordPress

Fixing Error Establishing a Database Connection

πŸ“… 25 November 2026 ✏️ 25 November 2026 ⏱ 4 min leestijd

Getting ‘Error establishing a database connection’ in WordPress? Find causes and solutions here, explained step by step.

The message Error establishing a database connection means WordPress cannot connect to the MySQL database containing all your content, settings, and users. As a result, the site shows an empty white screen with only this text. Usually the cause is incorrect login details in wp-config.php, a deleted or blocked database user, a corrupted database, or a package limit being reached. Below we go through the most common causes, from most to least likely.

WordPresswp-config.phpMySQLdatabase

1. Checking database details in wp-config.php

The most common cause is a mistake in the wp-config.php file, located in the root folder of your WordPress installation. It contains four values that must match exactly: DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST. Open the file via the file manager in Plesk or via FTP and check whether these values match the actual database and user. A password that was once changed without updating wp-config.php is a common culprit. Also watch out for spaces or quotation marks that were accidentally removed or added while editing the file.

πŸ’‘ Tip: Always make a copy of wp-config.php before making changes, so you can easily undo any adjustment.

2. Database user and permissions in Plesk

If wp-config.php is correct, check whether the database user still exists and has the right permissions. In Plesk, go to Websites & Domains and then to Databases. Here you’ll see the database and its associated user. Check whether the user is still linked to the correct database and has full permissions (read, write, modify). A user may have been accidentally deleted, for example during a cleanup, or the password may have been changed without this being updated in wp-config.php. You can easily set a new password in Plesk and then update it in wp-config.php.

3. Repairing a corrupted database

If the login details and permissions are correct, the database itself may be corrupted, for example due to an interrupted update or a sudden server failure. In that case, WordPress sometimes shows a slightly different message about a corrupted database, but it can also appear as a general connection error. Via WP Toolkit in Plesk, you can select Repair database for the relevant website, which automatically restores damaged tables. If this doesn’t work, open phpMyAdmin via Plesk, select all tables of the database, and choose the Repair option at the bottom of the page.

4. Package limit reached

A less obvious but real cause is that your hosting package has reached a limit, for example the maximum number of database connections or the storage limit for databases. Check in Plesk under Subscriptions or Statistics whether a limit has been reached. If so, upgrading to a larger package is the solution. Check out the options at webhosting if your package turns out to be structurally too limited.

1

Check wp-config.php

Compare DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST with the details in Plesk.

2

Check the database user

Check in Plesk under Databases whether the user exists and has full permissions.

3

Repair the database

Use WP Toolkit or phpMyAdmin to restore damaged tables.

4

Check your package limit

Check whether a limit has been reached and consider an upgrade if needed.

If these steps don’t solve the problem, contact support via WhatsApp, a ticket, or email. Be sure to include your domain name, the time the message appeared, and the exact error message so we can take a look right away. You can also find more explanations about common issues in the knowledge base.

Frequently asked questions

Will I lose data if I repair the database?

No, a repair via WP Toolkit or phpMyAdmin restores damaged table structures without removing content. However, it’s wise to check a backup beforehand.

Can an expired domain cause this message?

No, this error message specifically concerns the database connection, not your domain registration. If you’re unsure about your domain, check the details at domain names.

Does a daily backup help with recovery?

Yes, with a recent backup you can restore the database to a working version if repair doesn’t succeed. Daily backups make this recovery fast and reliable.

Can I switch if my current host doesn’t resolve this?

Yes, you can. Check out the options at switching to Tandata and take advantage of the 100-day money-back guarantee if you want to try it out.

Conclusion

You can usually resolve the Error establishing a database connection message by first checking wp-config.php, then the database user in Plesk, then repairing the database itself, and finally checking whether your package limit has been reached. If you can’t resolve it, support is available 24/7 via WhatsApp, ticket, or email.

View webhosting β†’

Was dit artikel nuttig?