Category: WordPress Troubleshooting
The WordPress white screen of death is one of the most frustrating errors because it often shows a completely blank page with no visible message. The frontend may be blank, the admin dashboard may be blank, or only a specific page may stop loading.
In most cases, the white screen of death is caused by a PHP fatal error, plugin conflict, theme issue, memory exhaustion, broken update, bad code snippet, corrupted cache, database issue, or server configuration problem.
This guide gives you 12 practical fixes with exact code, WP-CLI commands, file manager steps, and safe debugging snippets so you can find the real cause and bring the site back online.
TL;DR: Fastest Safe Fix
To fix the WordPress white screen of death, first enable private debug logging, check wp-content/debug.log, deactivate plugins, switch to a default theme, increase PHP memory, clear cache, check .htaccess or Nginx rules, restore broken core files, and review recent changes. Do not randomly delete files. Always back up the site before editing wp-config.php, database tables, plugins, themes, or server rules.
What Is the WordPress White Screen of Death?
The WordPress white screen of death, often called WSOD, is a blank white screen that appears when WordPress cannot finish loading. Sometimes the whole site is blank. Sometimes only wp-admin, the editor, a plugin screen, or one page is blank.
Common causes include:
- Plugin fatal error.
- Theme fatal error.
- PHP memory limit exhaustion.
- Bad custom code snippet.
- Failed WordPress core, plugin, or theme update.
- Broken
.htaccessor rewrite rules. - Corrupted cache.
- Wrong PHP version.
- Database connection or database table issue.
- File permission problem.
- Missing core files.
- Server-level PHP or web server error.
The fastest way to fix it is not guessing. The fastest way is to make WordPress log the real error privately, then fix the specific file, plugin, theme, memory setting, or server issue causing the blank page.
Before You Start: Take a Quick Backup
Before editing files or database settings, take a backup if you can access hosting, cPanel, SFTP, SSH, or your backup plugin.
WP-CLI database backup:
wp db export before-wsod-fix.sql
SSH files backup:
tar -czf wordpress-files-before-wsod.tar.gz /path/to/wordpress
Minimum files to copy before editing:
wp-config.php.htaccessif using Apache/LiteSpeed- The active theme folder
- Any custom plugin or code snippet file you recently changed
Fix 1: Enable Private Debug Logging
Start here. A white screen usually hides the real PHP error. Enable private logging so you can see the exact file and line causing the problem without showing errors to visitors.
Add this code to wp-config.php above the final line that says “stop editing”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Then reload the broken page and check this file:
wp-content/debug.log
What to look for:
PHP Fatal errorAllowed memory size exhaustedUncaught ErrorCall to undefined functionCannot redeclareParse errorFailed opening required
Example fatal error:
PHP Fatal error: Uncaught Error: Call to undefined function example_function()
in /wp-content/plugins/example-plugin/example.php on line 42
That tells you the likely source: the plugin file and the line number.
FyrePress tool: If you have a debug log or server error log, use the FyrePress Server Log Analyzer to classify the error.
Fix 2: Use WordPress Recovery Mode
If WordPress detects a fatal plugin or theme error, it may email the site administrator a Recovery Mode link. This lets you log into the dashboard while the broken plugin or theme is paused for your session.
What to do:
- Check the admin email inbox.
- Look for an email saying the site is experiencing a technical issue.
- Click the Recovery Mode link.
- Log in to WordPress.
- Deactivate or update the plugin/theme causing the fatal error.
- Exit Recovery Mode after fixing the issue.
Developer note:
If you are working on a staging or development site and want raw fatal errors visible, you can temporarily disable the fatal error handler. Do not use this on production unless you understand the risk.
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
On a live site, keep errors hidden and logged privately instead.
Fix 3: Deactivate All Plugins
Plugin conflicts are one of the most common causes of the WordPress white screen of death. If you cannot access wp-admin, deactivate plugins through SFTP, File Manager, or WP-CLI.
Method A: Deactivate plugins with WP-CLI
wp plugin deactivate --all
Then reload the site. If it works, reactivate plugins one by one:
wp plugin activate plugin-folder-name
Method B: Deactivate plugins with SFTP/File Manager
Rename the plugins folder:
wp-content/plugins
to:
wp-content/plugins_old
This forces WordPress to deactivate normal plugins.
Then restore the folder name:
wp-content/plugins_old
to
wp-content/plugins
After that, reactivate plugins one by one from the dashboard until the white screen returns. The last activated plugin is likely the problem.
Fix 4: Disable Must-Use Plugins
Must-use plugins, also called MU plugins, do not deactivate from the normal Plugins screen. They live in wp-content/mu-plugins and load automatically.
If normal plugin deactivation does not fix the white screen, check this folder:
wp-content/mu-plugins
Temporarily disable MU plugins:
mv wp-content/mu-plugins wp-content/mu-plugins_disabled
Or rename individual MU plugin files:
example-mu-plugin.php
to
example-mu-plugin.php.disabled
Common MU plugin sources:
- Managed hosting tools.
- Security layers.
- Cache systems.
- Custom agency code.
- Performance tools.
- Migration plugins.
If disabling MU plugins fixes the site, restore them one at a time and check logs.
Fix 5: Switch to a Default Theme
A broken active theme can cause a white screen, especially after a theme update, PHP upgrade, custom code edit, or template change.
Method A: Switch theme with WP-CLI
First list installed themes:
wp theme list
Then activate a default theme that exists on your site:
wp theme activate twentytwentyfive
If the default theme is not installed:
wp theme install twentytwentyfive --activate
Method B: Disable active theme with SFTP/File Manager
Go to:
wp-content/themes/
Rename the active theme folder:
active-theme-name
to
active-theme-name_disabled
WordPress will try to fall back to another available theme.
Method C: Switch theme in the database
Use this only if you cannot use WP-CLI and understand database editing.
UPDATE wp_options
SET option_value = 'twentytwentyfive'
WHERE option_name IN ('template', 'stylesheet');
Replace wp_ with your actual table prefix if different.
Fix 6: Increase PHP Memory Limit
If the debug log shows Allowed memory size exhausted, WordPress or a plugin is running out of PHP memory.
wp-config.php memory fix:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
Add this above the final stop-editing comment in wp-config.php.
php.ini example:
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
.user.ini example:
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
Apache .htaccess example:
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300
Important: php_value rules do not work on all hosting setups and can cause a 500 error on some servers. If the site breaks after adding them, remove the lines and ask your host to raise the limit.
Fix 7: Remove Bad Custom Code Snippets
A single missing semicolon, wrong function name, or duplicate function can trigger a blank screen. This often happens after editing functions.php, adding a code snippet, or pasting custom PHP from the internet.
Common broken code example:
function my_custom_function() {
echo 'Hello WordPress'
}
Fixed version:
function my_custom_function() {
echo 'Hello WordPress';
}
Duplicate function error example:
function custom_login_logo() {
// Code here.
}
function custom_login_logo() {
// Duplicate function creates fatal error.
}
Safer version:
if ( ! function_exists( 'custom_login_logo' ) ) {
function custom_login_logo() {
// Code here.
}
}
Where to check:
wp-content/themes/active-theme/functions.php- Code snippets plugin.
- Custom plugin files.
wp-content/mu-plugins- Recently edited template files.
If the issue started after adding code, remove that code first before changing server settings.
Fix 8: Rename .htaccess and Regenerate Permalinks
A broken .htaccess file can cause blank screens, redirect loops, 500 errors, or inaccessible pages on Apache/LiteSpeed servers.
Step 1: Rename the file
.htaccess
to
.htaccess_old
Step 2: Create a fresh default .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Step 3: Flush permalinks
If you can access the dashboard, go to:
Settings → Permalinks → Save Changes
Or use WP-CLI:
wp rewrite flush --hard
FyrePress tool: Use the FyrePress .htaccess Security Builder for cleaner Apache/LiteSpeed rule examples.
Fix 9: Clear WordPress, Server, CDN, and Object Cache
A corrupted cache can keep serving a broken blank response even after the real issue is fixed.
WP-CLI cache commands:
wp cache flush
wp transient delete --expired
If Redis object cache is used:
redis-cli FLUSHDB
Use FLUSHDB carefully. On shared Redis setups, confirm the database is only for this site.
Also clear:
- Cache plugin cache.
- Hosting/server cache.
- CDN cache.
- Browser cache.
- Page builder generated CSS cache.
- Object cache.
- Opcode cache if your host provides a reset option.
Optional OPcache reset PHP file
Create this temporarily only if you understand the security risk, run it once, then delete it immediately:
<?php
if ( function_exists( 'opcache_reset' ) ) {
opcache_reset();
echo 'OPcache reset complete.';
} else {
echo 'OPcache reset not available.';
}
Save as:
opcache-reset-temporary.php
Run it in the browser, then delete it immediately.
Fix 10: Re-upload WordPress Core Files
A failed update, incomplete upload, malware cleanup, or accidental file deletion can break WordPress core files. You can replace core files without deleting wp-content or wp-config.php.
WP-CLI core reinstall:
wp core download --force
Then update the database if needed:
wp core update-db
Manual method:
- Download a fresh copy of WordPress from WordPress.org.
- Upload fresh
wp-adminandwp-includesfolders. - Do not overwrite
wp-content. - Do not overwrite
wp-config.php. - Check the site again.
Do not delete these:
wp-content/uploadswp-content/themeswp-content/pluginswp-config.php- Custom verification files
Fix 11: Check PHP Version Compatibility
A site can go blank after switching PHP versions if an old plugin, old theme, or custom code is not compatible with the new PHP version.
Check PHP version with WP-CLI:
wp --info
Check from a temporary PHP file:
<?php
phpinfo();
Save it temporarily as:
phpinfo-temporary.php
Open it in the browser, check PHP version and extensions, then delete the file immediately.
Common PHP compatibility errors:
Call to undefined functionDeprecated function becomes fatal in newer PHPSyntax error caused by old codeMissing PHP extensionFatal error after hosting PHP upgrade
What to do:
- Temporarily switch back to the previous working PHP version.
- Update the broken plugin or theme.
- Replace abandoned plugins.
- Fix custom code for the newer PHP version.
- Test PHP upgrades on staging before production.
Fix 12: Check Database and Site URL Issues
Some blank screens come from database connection problems, wrong site URLs, bad migration settings, or damaged tables. If the error is database-related, debug logs and server logs usually show clues.
Check database credentials in wp-config.php:
define( 'DB_NAME', 'database_name' );
define( 'DB_USER', 'database_user' );
define( 'DB_PASSWORD', 'database_password' );
define( 'DB_HOST', 'localhost' );
Check site URLs with WP-CLI:
wp option get home
wp option get siteurl
Update site URLs if they are wrong:
wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'
Check and repair database tables:
wp db check
wp db repair
wp db optimize
Emergency database repair mode:
Add this to wp-config.php temporarily:
define( 'WP_ALLOW_REPAIR', true );
Then visit:
https://example.com/wp-admin/maint/repair.php
After repair, remove this line immediately:
define( 'WP_ALLOW_REPAIR', true );
Do not leave database repair mode enabled.
Quick Diagnosis Table
| Symptom | Likely Cause | Best Fix |
|---|---|---|
| Blank screen after plugin update | Plugin fatal error | Disable plugins and check debug log |
| Blank screen after theme edit | Theme PHP error | Switch to default theme and fix code |
| Blank screen with memory error in log | PHP memory exhausted | Increase memory and identify heavy plugin |
| Blank screen after migration | Wrong URLs, database, PHP, or missing files | Check wp-config, siteurl, files, and logs |
| Only wp-admin is blank | Admin plugin, memory, dashboard widget, or PHP error | Debug log, plugin disable, memory increase |
| Only frontend is blank | Theme, cache, template, or frontend plugin | Switch theme, clear cache, check template errors |
| White screen after PHP upgrade | Compatibility issue | Roll back PHP temporarily and update code |
Best Fix Order for Beginners
If you do not know where to start, follow this safe order.
- Check the admin email for Recovery Mode.
- Enable private debug logging.
- Read
wp-content/debug.log. - Deactivate all plugins.
- Switch to a default theme.
- Increase PHP memory if the log shows memory exhaustion.
- Remove recent custom code snippets.
- Rename
.htaccessand flush permalinks. - Clear cache and object cache.
- Re-upload core files.
- Check PHP version compatibility.
- Check database credentials, site URLs, and database tables.
What Not to Do
- Do not delete plugins randomly without a backup.
- Do not overwrite
wp-contentduring core reinstall. - Do not leave
WP_DEBUG_DISPLAYenabled on a live site. - Do not leave
phpinfo()files online. - Do not leave OPcache reset files online.
- Do not run database repair mode permanently.
- Do not change PHP versions repeatedly without checking logs.
- Do not import an old database over a live WooCommerce store without checking recent orders.
- Do not edit database values unless you have a backup.
- Do not assume the theme is fine just because plugins were disabled.
Final Recommendation
The WordPress white screen of death looks scary, but it usually has a clear technical cause. Start with private debug logging, then use the log to identify whether the issue comes from a plugin, theme, memory limit, custom code snippet, cache layer, server rule, PHP version, core file, or database setting.
For most sites, the fastest practical fix is to enable logging, deactivate plugins, switch to a default theme, increase memory if needed, and review the most recent change. For business-critical sites, work on staging or take a backup before every fix.
The goal is not only to bring the site back. The goal is to find the exact cause so the white screen does not come back after the next update.
Frequently Asked Questions
What causes the WordPress white screen of death?
The WordPress white screen of death is usually caused by a PHP fatal error, plugin conflict, theme issue, memory exhaustion, broken update, bad custom code, corrupted cache, database issue, or server configuration problem.
How do I see the real error behind a white screen?
Enable private debug logging in wp-config.php with WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY set to false. Then check wp-content/debug.log.
How do I disable plugins if wp-admin is blank?
Use WP-CLI with wp plugin deactivate --all, or rename wp-content/plugins to plugins_old through SFTP or File Manager.
How do I switch themes if WordPress admin is not loading?
Use WP-CLI with wp theme activate twentytwentyfive, or rename the active theme folder through SFTP so WordPress can fall back to another installed theme.
Can increasing PHP memory fix the white screen?
Yes, if the log shows Allowed memory size exhausted. Add WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT in wp-config.php, or ask your host to raise the PHP memory limit.
Can .htaccess cause a white screen?
Yes. A broken .htaccess file can cause blank screens, 500 errors, or redirect loops on Apache/LiteSpeed servers. Rename it and regenerate permalinks.
Does WordPress Recovery Mode fix the white screen automatically?
No. Recovery Mode helps administrators access the dashboard by pausing the broken plugin or theme for that session. You still need to update, disable, replace, or fix the broken code.
Why is only wp-admin showing a white screen?
This often points to an admin-only plugin, dashboard widget, memory limit, PHP error, security plugin, update issue, or custom admin code. Check debug.log and deactivate plugins.
Why did my site show a white screen after updating PHP?
A plugin, theme, or custom code snippet may not be compatible with the new PHP version. Temporarily switch back to the previous working PHP version, update the broken code, then test the upgrade on staging.
Should I delete WordPress and reinstall it?
No. Do not delete the site. If core files are corrupted, re-upload fresh WordPress core files or run wp core download --force. Do not overwrite wp-content or wp-config.php.