Type something to search...
How to fix the white screen of death in WordPress?

How to fix the white screen of death in WordPress?

To fix the white screen of death in WordPress, start by checking your admin email for a recovery mode link, then turn on debugging in wp-config.php to see the actual error. In most cases, the cause is a faulty plugin or theme, so deactivating all plugins by renaming the wp-content/plugins folder, or switching to a default theme, brings your site back. If that doesn't work, increase the PHP memory limit, clear your caches, and check file permissions and server error logs.

Few things are as alarming as loading your site and seeing nothing but a blank white page. The good news is that the white screen of death, often shortened to WSOD, almost always has a fixable cause, and you rarely lose any content. In this guide, you'll learn what causes it, how to find the exact error, and a step-by-step process to get your site working again, even when you can't access the dashboard.

What Is the WordPress White Screen of Death?

The white screen of death is a blank page that appears instead of your website or dashboard, with no error message and no content. It happens when PHP hits a fatal error and stops running before WordPress can output anything, and error display is turned off, as it should be on a live site.

Since WordPress 5.2, the blank white screen has become less common. WordPress now catches many fatal errors and shows a message instead: "There has been a critical error on this website." It also emails the site administrator with details about the error and a special recovery mode link. However, you can still get a true blank screen if the error happens very early, if the email doesn't arrive, or if a caching layer or server setting interferes.

The white screen can affect:

  • Your entire site: Both the front end and admin show a blank page.
  • Only the front end: The dashboard works, but visitors see a white page, which often points to your theme.
  • Only the admin: The front end works, but /wp-admin/ is blank, which often points to a plugin.
  • Specific pages or actions: Only certain pages, posts, or actions like saving, which often points to a specific feature or memory limits.

Common Causes of the White Screen of Death

Most white screens come down to one of these:

  1. Plugin conflicts or bugs: A plugin update, a newly installed plugin, or two plugins that don't work together.
  2. Theme errors: A broken theme update, an incompatible theme, or a mistake in custom code.
  3. Code errors in functions.php: A missing semicolon, an unclosed bracket, or a duplicate function name added while editing.
  4. PHP memory exhaustion: A page that needs more memory than the PHP limit allows.
  5. PHP version incompatibility: Older plugins or themes that use code removed in PHP 8.x.
  6. Failed or incomplete updates: An update interrupted partway through, leaving files missing or mismatched.
  7. Corrupted files: Damaged core files, often after a failed upload or a hack.
  8. Server issues: File permission problems, PHP-FPM crashes, or resource limits on your hosting account.
  9. Caching: A cached blank page that keeps being served even after the problem is fixed.

Before You Start: Back Up and Prepare

Before changing files, take a backup if you can, or at least download copies of any files you plan to edit, especially wp-config.php and functions.php. Many hosts also have automatic daily backups you can restore from if needed.

You'll need access to your site's files. Any of these works:

  • Your host's File Manager, such as cPanel's File Manager
  • An FTP or SFTP client, such as FileZilla
  • SSH, ideally with WP-CLI installed

Step 1: Check for a Recovery Mode Email

If WordPress detected the fatal error, it sent an email to your site's admin email address with the subject "Your Site is Experiencing a Technical Issue." The email usually tells you which plugin or theme caused the error and includes a special link.

  1. Open the email: Check your inbox and spam folder for the address set in Settings > General.
  2. Click the recovery mode link: This logs you into a special recovery mode where the faulty plugin or theme is paused just for your session.
  3. Fix the problem: WordPress shows a notice identifying the problem. You can deactivate the plugin, switch themes, or check for an update.
  4. Exit recovery mode: Click Exit Recovery Mode in the admin toolbar when you're done.

If the email doesn't arrive, often because your site can't send email reliably, move on to the next steps.

Step 2: Enable Debugging to See the Error

The white screen hides the error message. Turning on WordPress debug mode reveals it, which often tells you exactly what's wrong.

Open wp-config.php in your WordPress root folder. Look for an existing WP_DEBUG line and replace it, or add these lines above /* That's all, stop editing! Happy publishing. */:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

This logs errors to a file without showing them to visitors. Reload the broken page, then open wp-content/debug.log. Look for lines containing PHP Fatal error. A typical entry looks like this:

PHP Fatal error:  Uncaught Error: Call to undefined function some_old_function() in /home/user/public_html/wp-content/plugins/example-plugin/includes/core.php:42

The file path is the key clue. Here, the error comes from a plugin called example-plugin, on line 42 of core.php. If the path points to wp-content/themes/, it's a theme problem.

If you're working on a staging site or no visitors can see the site anyway, you can temporarily set WP_DEBUG_DISPLAY to true to see errors directly on the screen.

When you're done troubleshooting, set WP_DEBUG back to false and delete the debug.log file, since it can contain information about your site's setup.

You can also check your server's PHP error log. Most hosts show it in the control panel, often under Metrics > Errors in cPanel, or as a file like error_log in your site's folder.

Step 3: Disable All Plugins

Plugins are the most common cause of the white screen. If you can access the dashboard, go to Plugins > Installed Plugins, select all, and choose Deactivate from the bulk actions menu. If you can't access the dashboard, disable them through your files.

Using File Manager or FTP

  1. Open wp-content: Navigate to the wp-content folder.
  2. Rename the plugins folder: Rename plugins to something like plugins-disabled. WordPress can no longer find your plugins, so it deactivates them all.
  3. Reload your site: If your site comes back, a plugin was the cause.
  4. Rename the folder back: Change plugins-disabled back to plugins. Your plugins will now appear as inactive in the dashboard.
  5. Reactivate one at a time: Go to Plugins > Installed Plugins and activate each plugin individually, reloading your site after each one. When the white screen returns, you've found the culprit.

If the debug log already named a specific plugin, you can skip the guesswork and rename just that plugin's folder inside wp-content/plugins.

Using WP-CLI

WP-CLI makes this much faster:

# See which plugins are active
wp plugin list --status=active

# Deactivate every plugin
wp plugin deactivate --all

# Or deactivate a single suspect plugin
wp plugin deactivate example-plugin

If WP-CLI itself fails because of the same fatal error, add --skip-plugins and --skip-themes to your command, for example wp plugin deactivate example-plugin --skip-plugins --skip-themes.

Once you find the faulty plugin, check for an update, look at its support forum for known issues, or replace it with an alternative.

Step 4: Switch to a Default Theme

If disabling plugins didn't help, your theme may be the problem, particularly if only the front end is blank.

Using the Dashboard

If you can access the admin, go to Appearance > Themes and activate a default theme like Twenty Twenty-Five.

Using File Manager or FTPs

  1. Open wp-content/themes: Navigate to the themes folder.
  2. Check that a default theme exists: Make sure a folder like twentytwentyfive is there. If not, download it from WordPress.org and upload it.
  3. Rename your active theme's folder: For example, rename my-theme to my-theme-disabled. WordPress will fall back to a default theme if one is installed.
  4. Reload your site: If it works, the problem is in your theme.

Using WP-CLI command

wp theme activate twentytwentyfive --skip-plugins --skip-themes

If you use a child theme, check its functions.php first. Recent custom code edits are a very common cause.

Step 5: Fix Code Errors in functions.php

If the white screen appeared right after you added code to functions.php or a custom plugin, that code is almost certainly the problem. Common mistakes include:

  • A missing semicolon at the end of a line
  • An unclosed bracket or quote
  • A function name that's already declared elsewhere
  • Extra whitespace or a closing ?> tag followed by blank lines at the end of the file
  • Code pasted with smart quotes instead of straight quotes

Open the file through File Manager or FTP and remove the code you added, or restore the file from your backup. For example, this snippet causes a fatal error because a function with the same name already exists:

// Fatal error if another plugin or theme already declares this function.
function get_custom_logo_url() {
    return get_theme_file_uri( 'assets/logo.svg' );
}

The fix is to use a unique, prefixed name, and if you're writing a pluggable function, wrap it in a function_exists() check:

if ( ! function_exists( 'sajjad_get_logo_url' ) ) {
    function sajjad_get_logo_url() {
        return get_theme_file_uri( 'assets/logo.svg' );
    }
}

If you have SSH access, you can check a PHP file for syntax errors before uploading it:

php -l wp-content/themes/my-child-theme/functions.php

A result of "No syntax errors detected" means the file is at least valid PHP.

To avoid this in the future, use a code snippets plugin like WPCode or Code Snippets. They catch many errors and let you disable a snippet safely without editing files.

Step 6: Increase the PHP Memory Limit

If your debug log shows "Allowed memory size exhausted," or the white screen appears only on heavy pages or admin screens, your site is running out of memory. Add this to wp-config.php above the "stop editing" line:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

If your server's PHP limit is lower, you may also need to raise memory_limit through your hosting control panel, .user.ini, or php.ini, or ask your host. I cover all these options in my guide on increasing the PHP memory limit in WordPress.

Step 7: Clear Your Cache

Sometimes you fix the problem, but a caching plugin, server cache, or CDN keeps serving the old blank page.

  • Caching plugin: If you can access the dashboard, use the Clear cache or Purge all button. If not, delete the cache folder, usually inside wp-content/cache.
  • Server cache: Use your host's dashboard to purge the cache.
  • CDN: Purge the cache in your CDN's dashboard, such as Cloudflare.
  • Browser: Do a hard refresh with Ctrl + Shift + R on Windows or Cmd + Shift + R on Mac, or test in a private window.

With WP-CLI, you can also flush the object cache:

wp cache flush

Step 8: Check Your PHP Version

If the white screen appeared after your host upgraded PHP, an older plugin or theme may be incompatible. Errors mentioning functions like create_function() or each(), which were removed in PHP 8.0, are a clear sign of this.

Check your PHP version in Tools > Site Health > Info > Server, or in your hosting control panel. The best long-term fix is to update or replace the incompatible plugin or theme. As a short-term measure, you can switch to a slightly older supported PHP version in your control panel while you sort it out, but don't stay on an outdated version, since it may no longer receive security fixes.

Step 9: Fix a Failed Update

If the white screen appeared during or right after an update:

  1. Check for a .maintenance file: If your site says "Briefly unavailable for scheduled maintenance," delete the .maintenance file in your WordPress root folder.

  2. Reinstall the plugin or theme: If a plugin or theme update was interrupted, delete its folder and install a fresh copy.

  3. Reinstall WordPress core files: If core files may be damaged, you can replace them without touching your content. With WP-CLI, run:

# Check core files against the official checksums
wp core verify-checksums

# Re-download core files for your current version without touching wp-content
wp core download --force --skip-content --version=$(wp core version)

Without WP-CLI, download the same version of WordPress from WordPress.org, unzip it, and upload the wp-admin and wp-includes folders plus the root files, except wp-config.php and the wp-content folder, overwriting the existing ones. You can also use Dashboard > Updates > Re-install version if you can access the admin.

Step 10: Check File Permissions

Incorrect file permissions can stop PHP from reading your files. The standard recommendations for WordPress are:

  • Folders: 755
  • Files: 644
  • wp-config.php: 640 or 600 on hosts that support it

If you have SSH access, you can reset permissions from your WordPress root folder:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

Only do this if you suspect a permissions problem, and check with your host first if you're unsure, since some hosting setups use different ownership rules.

Step 11: Fix the White Screen on Specific Pages

If only certain long posts are blank, the problem can be PHP's regular expression limits being reached while processing large content. You can raise those limits in wp-config.php:

ini_set( 'pcre.backtrack_limit', '5000000' );
ini_set( 'pcre.recursion_limit', '5000000' );

If only the admin is blank on a Multisite network, or only specific admin screens fail, check the debug log for errors from plugins that load only on those screens.

Step 12: Contact Your Host

If you've worked through every step and your site is still blank, contact your hosting provider. Share the error messages from your debug log and the steps you've already tried. The problem may be on the server side, such as a PHP-FPM crash, a resource limit on your account, a firewall rule, or a hardware issue that only your host can fix.

How to Prevent the White Screen of Death

  • Use a staging site: Test plugin, theme, and PHP updates on a copy of your site first.
  • Take regular backups: Automated daily backups mean you can roll back quickly.
  • Update carefully: Update one thing at a time on important sites, so you know what caused a problem.
  • Avoid editing live files directly: Use a child theme, a code snippets plugin, or a proper deployment workflow.
  • Choose well-maintained plugins: Check when a plugin was last updated and whether it supports your versions of WordPress and PHP.
  • Monitor your site: Uptime monitoring with a keyword check alerts you quickly if pages go blank.

FAQ: WordPress White Screen of Death

It's usually caused by a PHP fatal error from a faulty plugin, a theme problem, a code mistake in functions.php, exhausted PHP memory, or an incompatible PHP version. Error display is turned off, so you see a blank page instead of the error.

Almost never. Your posts, pages, and settings are stored in the database, which is usually unaffected. The white screen is typically caused by a code or configuration problem that can be fixed without touching your content.

Use your host's File Manager, FTP, or SSH. Rename the wp-content/plugins folder to disable all plugins, rename your active theme's folder to fall back to a default theme, and enable WP_DEBUG_LOG in wp-config.php to see the error.

Recovery mode is a feature added in WordPress 5.2. When a fatal error occurs, WordPress emails the admin a special link that logs them in with the faulty plugin or theme paused, so they can fix the problem from the dashboard.

This usually points to a plugin that runs only in the admin, or to memory limits being reached on heavy admin pages. Check the debug log, deactivate plugins, and consider raising WP_MAX_MEMORY_LIMIT.

Yes. A caching plugin can store and keep serving a blank page after the original problem is fixed, and a misconfigured caching plugin can cause errors itself. Clearing the cache or temporarily disabling the plugin resolves this.

When WP_DEBUG_LOG is set to true, WordPress writes errors to wp-content/debug.log by default. Your host may also keep a separate PHP error log in your control panel or in a file called error_log.


Conclusion

The WordPress white screen of death looks frightening, but it's usually one of the easiest problems to fix once you know where to look. Start with the recovery mode email, turn on WP_DEBUG_LOG to find the exact error, and let the file path guide you. In most cases, disabling the faulty plugin, switching away from a broken theme, removing a bad code snippet, or raising the PHP memory limit is all it takes.

Once your site is back, turn debugging off, clear your caches, and think about what caused the problem. A staging site, regular backups, careful updates, and uptime monitoring will make the next white screen far less likely, and far less stressful if it ever does happen.

Tags :
Share :

Related Posts

What are the best WordPress security plugins?

What are the best WordPress security plugins?

The best WordPress security plugins for most sites are Wordfence, Sucuri Security, Solid Security, MalCare, All-In-One Security (AIOS), Patchstack, a

Dive Deeper
What is the difference between posts and pages in WordPress?

What is the difference between posts and pages in WordPress?

The main difference between posts and pages in WordPress is that posts are timely, dated entries that appear in your blog feed, archives, and RSS fee

Dive Deeper
How much does it cost to build a WordPress website?

How much does it cost to build a WordPress website?

Building a WordPress website can cost anywhere from roughly the price of a domain and a year of budget hosting, if you do it yourself with free tools

Dive Deeper