A blank browser tab with no error message is one of the fastest ways to derail a deployment, but a reliable wordpress white screen of death fix comes down to following a calm, ordered debugging routine. Instead of randomly renaming folders or restoring backups blindly, you can surface the exact fatal error, isolate the offending code, and bring the site back online in minutes.
Quick answer
- Enable
WP_DEBUGandWP_DEBUG_LOGinwp-config.phpwhile keepingWP_DEBUG_DISPLAYset tofalseso errors write towp-content/debug.log. - Check your inbox for the WordPress Recovery Mode email, or log in via
/wp-login.php?action=entered_recovery_modeif you have the recovery link. - Run
wp plugin deactivate --allandwp theme activate twentytwentyfourvia WP-CLI to isolate whether a plugin or theme triggers the fatal error. - Increase
WP_MEMORY_LIMITto256Minwp-config.phpif the log reports an exhausted memory size. - Inspect
wp-content/mu-plugins/and flush PHP opcache if standard plugin deactivation does not clear the screen.
Why the white screen happens and what to check first
The White Screen of Death (WSOD) is almost always a PHP fatal error or a memory exhaustion event where display_errors is turned off at the server level. Because production servers hide raw PHP errors from visitors, the response returns an HTTP 500 status code with an empty body.
Before you touch any files, check whether the white screen affects the entire site, only the front end, or only wp-admin. If wp-admin loads while the front end is blank, the issue is usually in your active theme or a front-end rendering hook. If both are blank, a plugin, must-use plugin, or wp-config.php edit is the likely culprit.
On production builds I start by checking the server's HTTP response headers with curl from the terminal. This confirms whether PHP is crashing immediately or if a caching layer is serving a stale empty response.
curl -I https://example.com
If you see HTTP/2 500 or HTTP/1.1 500 Internal Server Error, PHP is crashing before WordPress finishes rendering. If you see 200 OK with Content-Length: 0, a proxy, CDN, or page cache may be caching an empty output.
Step 1: Turn on WP_DEBUG logging safely
Guessing which plugin broke your site wastes time. Your first real step in any wordpress white screen of death fix is forcing PHP and WordPress to write the exact error, file path, and line number to a log file.
Open wp-config.php via SSH or SFTP and look for the existing WP_DEBUG line. Replace it with the following configuration just above the / That's all, stop editing! / comment.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Setting WP_DEBUG_DISPLAY to false ensures visitors never see database credentials or file paths if the site partially renders. Reload the broken URL once, then inspect wp-content/debug.log from your terminal.
tail -n 50 wp-content/debug.log
Never leaveWP_DEBUG_LOGenabled indefinitely on a live site. Once you fix the fatal error, setWP_DEBUGback tofalseand deletewp-content/debug.logso sensitive stack traces are not exposed publicly.
What if debug.log is empty?
If wp-content/debug.log does not exist or stays empty after a reload, the crash is happening before WordPress loads its error handler, or PHP lacks write permissions to wp-content/. In that case, check your web server's PHP error log—commonly located at /var/log/nginx/error.log, /var/log/apache2/error.log, or inside your host's control panel.
Step 2: Use WordPress Recovery Mode
Since WordPress 5.2, core includes a built-in Fatal Error Protection handler. When a plugin or theme triggers a fatal error, WordPress attempts to send an email to the site administrator's address with a special Recovery Mode link.
Clicking that link sets a cookie in your browser that pauses the offending plugin or theme for your session only. Visitors still see the broken state, but you can log in to wp-admin, read the exact error message under Plugins or Themes, and deactivate or roll back the broken code.
Recovery Mode has two common limitations:
- If the server cannot send transactional email, you will never receive the link.
- If the fatal error occurs inside
wp-config.php, a drop-in likeobject-cache.php, or a must-use plugin before WordPress initializes Recovery Mode, the handler never fires.
When Recovery Mode is unavailable, move straight to WP-CLI.
Step 3: Isolate plugins and themes with WP-CLI
Renumbering or renaming folders over SFTP works in a pinch, but it is messy and leaves orphaned database states. WP-CLI is faster, cleaner, and scriptable.
Deactivate all plugins at once
Connect via SSH, navigate to your WordPress root directory, and run:
wp plugin deactivate --all
Reload the site. If it loads, a plugin caused the white screen. Reactivate your plugins one by one—or in small batches—while reloading the site after each step until the white screen returns.
wp plugin activate woocommerce
wp plugin activate advanced-custom-fields-pro
If wp plugin deactivate --all itself throws a fatal error, a plugin's code is crashing WP-CLI before it can finish. Pass the --skip-plugins flag to bypass loading plugin code during the command.
wp plugin deactivate --all --skip-plugins
Switch to a default theme
If deactivating all plugins does not resolve the white screen, test your active theme by switching to a default WordPress theme such as Twenty Twenty-Four.
wp theme activate twentytwentyfour --skip-plugins --skip-themes
If the site comes back online, the fatal error lives inside your theme's functions.php, a template part, or a composer dependency that failed to load.
Check must-use plugins and drop-ins
Standard deactivation commands do not touch wp-content/mu-plugins/ or drop-in files like wp-content/object-cache.php and wp-content/db.php. List what is inside wp-content/mu-plugins/ and temporarily move suspect files out of the directory.
ls -la wp-content/mu-plugins/
mv wp-content/mu-plugins/custom-loader.php wp-content/mu-plugins/custom-loader.php.bak
If you use Redis or Memcached, a stale or mismatched object-cache.php drop-in after a PHP upgrade is a frequent cause of silent crashes. Moving object-cache.php aside and flushing the cache service often restores the site immediately.
Step 4: Fix PHP memory exhaustion
If your debug.log or server error log contains a line like Fatal error: Allowed memory size of 134217728 bytes exhausted, PHP hit its memory ceiling before finishing the request.
You can raise WordPress's memory limit in wp-config.php above the / That's all, stop editing! / line:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
WP_MEMORY_LIMIT controls front-end requests, while WP_MAX_MEMORY_LIMIT applies to wp-admin tasks like WooCommerce exports or media processing. Keep in mind that WordPress cannot raise the limit higher than the memory_limit configured in your server's php.ini.
I recommend treating 256M as a practical ceiling for standard sites. If a site still exhausts 256M or 512M on normal page loads, increasing the limit further masks a real bug—usually an infinite loop, an unpaginated WP_Query, or a plugin loading massive autoloaded options on every request.
Step 5: Resolve syntax errors, PHP version mismatches, and opcache
Sometimes the white screen appears right after a deployment or a host-level PHP upgrade. Two common culprits remain when plugins and memory limits are ruled out.
Run a PHP syntax check
If you edited functions.php or a custom plugin and missed a semicolon or bracket, php -l catches it immediately without executing the file.
find wp-content/themes/your-theme -name "*.php" -exec php -l {} \;
Any file with a parse error will print PHP Parse error: syntax error along with the exact line number.
Flush PHP opcache and check PHP version compatibility
Modern WordPress hosts run PHP opcache, which keeps compiled PHP bytecode in memory. After a deployment, opcache can serve stale compiled files that reference functions or classes you just renamed, causing a fatal error.
Restarting PHP-FPM or clearing opcache from your hosting dashboard resolves this. If the white screen started immediately after upgrading from PHP 7.4 to PHP 8.2 or 8.3, look for Fatal error: Uncaught Error: Call to undefined function or TypeError in debug.log, which indicates an older plugin or theme is incompatible with the new PHP version.
Checklist
- Confirm the HTTP status code with
curl -Ito verify a 500 error rather than a cached empty page. - Enable
WP_DEBUGandWP_DEBUG_LOGinwp-config.phpwithWP_DEBUG_DISPLAYset tofalse. - Read the last lines of
wp-content/debug.logor the server's PHP error log to identify the exact file and line. - Check your administrator email for a WordPress Recovery Mode link if the site is partially reachable.
- Run
wp plugin deactivate --all --skip-pluginsvia WP-CLI and reactivate plugins one by one. - Switch to a default theme with
wp theme activate twentytwentyfour --skip-themesif plugins are not the cause. - Inspect
wp-content/mu-plugins/andwp-content/object-cache.phpfor drop-ins that bypass normal deactivation. - Raise
WP_MEMORY_LIMITto256Monly if the log explicitly reports memory exhaustion. - Run
php -lon recently edited files and flush PHP opcache after deployments. - Set
WP_DEBUGback tofalseand deletewp-content/debug.logonce the site is stable.
Frequently asked questions
How do I fix the WordPress white screen of death without wp-admin access?
Connect to your server via SSH or SFTP, enable WP_DEBUG and WP_DEBUG_LOG in wp-config.php, and read wp-content/debug.log to find the exact fatal error. Then use WP-CLI commands like wp plugin deactivate --all --skip-plugins to disable the broken plugin without needing wp-admin.
Why is my WordPress site showing a white screen but debug.log is empty?
An empty debug.log usually means PHP is crashing before WordPress loads its error handler, or PHP lacks write permissions to wp-content. Check your server-level PHP error log in /var/log/nginx/error.log, /var/log/apache2/error.log, or your hosting control panel.
What memory limit should I set to fix a WordPress white screen?
Set WP_MEMORY_LIMIT to 256M and WP_MAX_MEMORY_LIMIT to 512M in wp-config.php if your error log reports an exhausted memory size. If the site still crashes above 256M on normal page loads, investigate runaway queries or bloated autoloaded options instead of raising the limit further.
Can a WordPress theme update cause the white screen of death?
Yes. A theme update can introduce a PHP syntax error, a missing dependency, or an incompatibility with your server's PHP version. Switching to a default theme via WP-CLI with wp theme activate twentytwentyfour --skip-themes will immediately confirm whether the theme is at fault.
- Advanced Administration HandbookAdvanced Administration Handbook
- WP Engine supportWP Engine support
Drafted with AI assistance. Code targets current WordPress, WooCommerce and Next.js APIs; test changes on a staging site before production.