How to fix the WordPress white screen of death
A calm, step-by-step guide to diagnosing and fixing a blank white WordPress page, from recovery mode and debug logs to plugins, themes and memory limits.
What this WordPress error means and how to fix it, from checking database credentials and server status to repairing tables and handling traffic spikes.
This error means WordPress can't talk to its database. The most common causes are wrong database details in wp-config.php, a database server that's down or overloaded, a corrupted database, or hosting resource limits being hit. Check the credentials first, then confirm the database server is running with your host, repair tables if needed and look at traffic or resource spikes.
WordPress stores almost everything in a database: posts, pages, settings, users. When it can't connect, it shows "Error establishing a database connection" and nothing else. Here's how to find and fix the cause.
Visit the front end and the admin area (/wp-admin). If the admin shows a different message, such as tables needing repair, that points towards database corruption. If both show the same error, it's likely a connection or server problem.
Open wp-config.php using your host's file manager or SFTP and check:
Compare them with the details in your hosting control panel. Credentials often change after a migration, a password reset or a hosting move. Fix any mismatch, save and reload.
If the credentials are correct, the database server may be down or overloaded:
If other sites on the same hosting account show the same error, it's almost certainly a server issue.
Your host's database tools, such as phpMyAdmin, can confirm whether you can log in with the same credentials. If you can't, the user may lack permissions or the password may be wrong.
Database tables can become corrupted. WordPress includes a repair tool:
Many hosts also offer repair tools in their control panels.
On shared hosting, a traffic spike, bot attack or heavy plugin can exhaust database connections. Signs include errors that come and go. Solutions:
If the database is badly damaged and repair doesn't work, restore the most recent clean backup. Check for lost content created since that backup.
If you see a blank page instead, read our guide to the WordPress white screen of death. Server-level errors may show as a 500 error; see our guide to fixing 500 internal server errors.
If you have SSH access, you can test the database connection directly with your host's database client, using the same credentials as wp-config.php. A successful login confirms the credentials and server are working, pointing towards a WordPress-specific issue such as corrupted tables. A failed login shows the exact error message, such as access denied or unknown host, which narrows down the cause.
This error commonly appears after moving a site to new hosting. Check that the database was imported completely, the database user exists on the new server with the right permissions, DB_HOST matches the new host's requirements and the table prefix in wp-config.php matches the imported tables.
If credentials are correct and the database server doesn't respond, contact your host with the exact time of the errors and any messages from logs. Server-level issues, such as crashed database services or resource limits, can only be fixed by the host.
Set up uptime monitoring that checks a real page, so you're alerted within minutes rather than hearing from customers.
Our maintenance and support team diagnoses and fixes database errors and sets up monitoring and backups. Our CMS development team optimises WordPress databases, and our web development team can move sites to more reliable hosting.
Usually not. The error means WordPress can't connect, not that data is gone. Check credentials and the server first.
Intermittent errors often mean the database server is overloaded by traffic, bots or heavy plugins.
Yes, but remove the WP_ALLOW_REPAIR setting afterwards because the repair page is accessible without logging in while it's enabled.
This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.
Tell us about your project and get a free, fixed quote.
Get a free quoteA calm, step-by-step guide to diagnosing and fixing a blank white WordPress page, from recovery mode and debug logs to plugins, themes and memory limits.
What a 500 error means, how to find the real cause in server logs, and step-by-step fixes for the most common triggers across WordPress and custom sites.
Why redirect loops happen, how to trace them, and how to fix the common causes, from HTTPS and CDN settings to www rules and CMS URLs.