Development

WordPress white screen of death: how to diagnose and fix it

The “white screen of death” is a blank page with no message — sometimes the whole site, sometimes just the admin. It looks alarming, but it is almost always a PHP fatal error that WordPress is hiding because error display is off in production. Switch the message back on and the fix is usually quick.

1. Turn on the debug log

Edit wp-config.php (over FTP/SFTP or your host’s file manager if the admin is down) and add, above the stop-editing line:

  • define('WP_DEBUG', true);
  • define('WP_DEBUG_LOG', true);
  • define('WP_DEBUG_DISPLAY', false);

Reload the broken page, then open /wp-content/debug.log. The last entry names the file, line and message behind the crash — that is your answer. Turn these back off once fixed.

2. Rule out a plugin

If the log points at a plugin (or you cannot get a log), deactivate all plugins: rename /wp-content/plugins to plugins-off over FTP. If the site returns, rename it back and reactivate plugins one at a time until it breaks again — that plugin is the cause.

3. Rule out the theme

Still blank with plugins off? Switch to a default theme by renaming your active theme’s folder in /wp-content/themes — WordPress falls back to a bundled theme. If that fixes it, the problem is in your theme (often a recent edit to functions.php).

4. Rule out memory

A page that dies only under load is often out of memory. Raise it with define('WP_MEMORY_LIMIT', '256M'); in wp-config.php. See our guide on “Allowed memory size exhausted” for the full memory fix.

Recovery mode

Modern WordPress emails the site admin a “recovery mode” link when a fatal error occurs, letting you log in and deactivate the offending plugin or theme safely. Check the admin inbox — it may hand you the fix without any file editing at all.