What it means
This WordPress message means the site could not connect to the MySQL or MariaDB database that stores its posts, pages and settings, so it cannot build any page. It is the site owner's problem: wrong login details in wp-config.php, a database server that is down or overloaded, or damaged database tables. Visitors cannot fix it and can only wait or let the owner know.
Common causes
- Wrong database name, username, password or host in wp-config.php
- The database server is down, restarting or overloaded
- The database user lost its password or permissions
- Damaged or corrupted database tables
- The hosting account hit its database or storage limit
- A hacked or modified wp-config.php file
How to fix it
Work down the list. Each fix is safe to try before moving on to the next.
FIX 01Reload laterEASY
- Wait a few minutes.
- Press
F5on Windows orCommand + Ron a Mac to reload.
Why it helps: If the database server was briefly overloaded or restarting, the site comes back on its own.
FIX 02Let the site owner knowEASY
- If the error stays for more than a short while, contact the site through its email or social media.
- Tell them the time you first saw the message.
Why it helps: Nothing on a visitor's device causes this error, so only the owner can fix it.
// RUN THIS SITE? FIXES FOR SITE OWNERS
FIX 03Check the database details in wp-config.phpMEDIUMSITE OWNERS
- Open your host's
File Manageror connect with SFTP and download a backup copy ofwp-config.phpfrom the WordPress root folder. - Open it and find the lines for
DB_NAME,DB_USER,DB_PASSWORDandDB_HOST. - In your hosting control panel (for example
MySQL Databasesin cPanel), confirm the database name and user exist and the user is assigned to that database. - Check that
DB_HOSTmatches what your host says; it is oftenlocalhost, but some hosts use a separate hostname. - Fix any mismatch, save the file and reload the site.
Why it helps: A typo or changed value here is the most common reason WordPress cannot log in to the database.
FIX 04Reset the database user's passwordMEDIUMSITE OWNERS
- In your hosting control panel, open the database users section.
- Set a new strong password for the user listed in
DB_USER. - Make sure that user has all privileges on the database named in
DB_NAME. - Put the same new password in
DB_PASSWORDinwp-config.phpand save.
Why it helps: If the details look right but still fail, the stored password or permissions may not match.
FIX 05Ask your host whether the database server is upEASYSITE OWNERS
- Check your host's status page for database or server outages.
- Try opening
phpMyAdminfrom your control panel; if it also cannot connect, the database server is likely down. - Contact your host and ask whether the database server is down, overloaded, or over a size or connection limit on your account.
Why it helps: When the details are right, the database server itself or an account limit is the next most likely cause.
FIX 06Repair the database tablesADVANCEDSITE OWNERS
- Back up the database first using your host's backup tool or phpMyAdmin export.
- Add
define( 'WP_ALLOW_REPAIR', true );towp-config.phpabove the line that says to stop editing. - Visit
yoursite.com/wp-admin/maint/repair.phpand chooseRepair Database. - Warning: this page works without logging in, so remove the
WP_ALLOW_REPAIRline as soon as the repair finishes.
Why it helps: Corrupted tables can stop WordPress from loading even when the connection details are correct.
FIX 07Check for a hacked or changed siteADVANCEDSITE OWNERS
- Compare
wp-config.phpwith your last known good backup for unexpected changes. - Look in your hosting panel for unfamiliar database users or recently changed files.
- If anything looks wrong, change your hosting, database and WordPress passwords and ask your host to scan the account.
Why it helps: WordPress's own guidance says a compromised site can cause this error once settings and the server are ruled out.
Check it's fixed
- The home page and wp-admin both load.
- You can log in and see your posts and pages.
- If you enabled WP_ALLOW_REPAIR, it has been removed from wp-config.php.
When to get help
If the details in wp-config.php are correct and phpMyAdmin cannot connect either, the database server is the problem and only your hosting provider can fix it. Contact them with the time the error started.
Questions
Did I lose my content?
Usually not. The error means WordPress cannot reach the database, not that the data is gone. Once the connection works, your posts normally reappear.
Why does wp-admin show a different message?
WordPress may say one or more tables are unavailable and the database may need repairing. That points to damaged tables rather than wrong login details.
Why did this start without me changing anything?
The database server may be down or overloaded, your host may have changed something, or the account may have hit a limit. Ask your host.
Related fixes
Still stuck?
Paste the exact message and the repair bot will find the closest fix, or search it on Google, Microsoft, Apple, Reddit and YouTube.