Debugging & Profiling

WordPress White Screen of Death: How to Fix It Fast

Fix the WordPress white screen: read the PHP error, switch off the plugin or theme with WP-CLI, check memory, with results from a test site.

Varun DubeyVarun Dubey
·12 min read
An empty browser window showing HTTP 500 next to the text 0 bytes returned under the headline The white screen of death

A white screen means PHP stopped before WordPress could print a page, and the fastest way to fix it is to read the PHP error instead of guessing. Check the error log first. If you cannot, deactivate every plugin with WP-CLI using --skip-plugins or by renaming the plugins folder, switch to a default theme the same way, and raise the PHP memory limit only if the log says memory ran out. On a current WordPress you will often see a short message instead of a blank page. That message, “There has been a critical error on this website”, is the same problem in a politer form.

Rather than repeat the usual advice from memory, we rebuilt this guide on 16 November 2026 around a throwaway WordPress 7.1.4 install on PHP 8.5.5 and broke it on purpose eight different ways. The status codes, page sizes, error lines and WP-CLI results in this post are from that test site. Where we relied on core source or official documentation instead, we say so.

The short version

  1. Look at the status code and the page size. curl -s -o /dev/null -w "%{http_code} %{size_download}\n" https://example.com/ separates a handled fatal error (500 plus a short message) from a truly blank one (zero bytes).
  2. Read the log. Turn on WP_DEBUG_LOG and read wp-content/debug.log, or read the server’s PHP error log. The first fatal line names the file.
  3. If it names a plugin or theme, switch it off from outside WordPress. wp plugin deactivate <slug> --skip-plugins or wp theme activate <default> --skip-themes.
  4. If it says memory size exhausted, find the cause before raising the limit. A higher limit only hides a leak.
  5. If the log shows nothing, check the file that loads first. A parse error in wp-config.php or a plugin that calls exit leaves no WordPress message at all.
  6. Verify core files last. wp core verify-checksums tells you in seconds whether core was touched.

Why is my WordPress site showing a white screen?

Because PHP hit an error and nothing was printed. WordPress hides errors from visitors on purpose, since a raw error can reveal file paths. Before WordPress 5.2 that meant a blank page. Since 5.2 a built-in fatal error handler catches most errors and shows a short notice instead. Which one you see depends on where the error happens.

We reproduced each case on the test site with PHP errors logged but not displayed, which is how most hosts run. The page size is the quick tell.

What we broke

HTTP status

What the visitor saw

A plugin calls a function that does not exist

500

“There has been a critical error on this website” (2,704 bytes)

A plugin uses all 128 MB of memory

500

The same critical error message

A plugin file with a parse error, forced active

500

The same critical error message

A fatal error inside a must-use plugin

500

The same critical error message

A theme’s functions.php calls a missing function

500

The same critical error message

The same plugin fatal with the fatal error handler turned off

500

A completely blank page, 0 bytes

A parse error in wp-config.php

500

A completely blank page, 0 bytes

A plugin that calls exit before the template loads

200

A completely blank page, 0 bytes, no error anywhere

Two things stand out. First, a blank page with a 500 status means PHP died before WordPress’s handler existed or after it was switched off. Second, the last row returns 200 and logs nothing, so a monitor that only checks status codes calls the site healthy. Check the size of the response too.

The core source explains the pattern. The handler in class-wp-fatal-error-handler.php acts on error types E_ERROR, E_PARSE, E_USER_ERROR, E_COMPILE_ERROR and E_RECOVERABLE_ERROR. It is registered during WordPress start-up, so an error in wp-config.php happens too early for it. A site can also opt out with the WP_DISABLE_FATAL_ERROR_HANDLER constant, which core reads in wp_is_fatal_error_handler_enabled().

How do I find the actual error behind a white screen?

Read the PHP error log. It is the one place that always has the file name and line number. Your host’s control panel usually has a log viewer, or the log sits in the server’s log folder. If you cannot find it, let WordPress write its own.

# checked on 16 Nov 2026 - works when wp-config.php has the "stop editing" comment line
wp config set WP_DEBUG true --raw
wp config set WP_DEBUG_LOG true --raw
wp config set WP_DEBUG_DISPLAY false --raw

On the test site those three commands added the constants, and the next request with a broken plugin wrote this line to wp-content/debug.log:

[16-Nov-2026 07:43:15 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function undefined_function_call() in /.../wp-content/plugins/broken-plugin/broken-plugin.php:6

Read it left to right. The error type is Fatal error, the message says what failed, and the path tells you the culprit: wp-content/plugins/broken-plugin/. Note that wp config set needs the standard /* That's all, stop editing! */ line in the file to know where to add a new constant. Our first attempt on a stripped-down config failed with “Unable to locate placement anchor” until we added it. If the file has a parse error itself, edit it by hand.

Keep WP_DEBUG_DISPLAY off on a live site, so visitors never see the error. The WordPress debugging handbook covers every debug constant. If debug.log never appears, our guide to why debug.log is not created lists thirteen causes. When you are done, delete the log and turn debugging off, because the file can leak paths if it is publicly readable.

What does the “critical error” email and recovery mode do?

When a fatal error happens during a normal page load, WordPress pauses the failing plugin or theme for a special login session and emails the administrator a link to it. The WordPress Recovery Mode documentation says that mode starts on a regular page load, not on cron or background tasks, and that faulty plugins or themes are paused only for your admin session so you can log in and deactivate them.

Four details from the core source on 16 November 2026 change what you should expect:

  • The email goes to the site’s admin email address, or to the address in the RECOVERY_MODE_EMAIL constant if you define one.
  • Core sends at most one recovery email per day by default (the recovery_mode_email_rate_limit filter), and the link stays valid for at least that long.
  • The handler only starts recovery mode on single-site installs. On multisite it still shows the error screen but does not start recovery mode.
  • The email is sent with wp_mail(). If the fatal error happens before your SMTP plugin loads, the message leaves through the server’s default mail, and the documentation warns it may be filtered as spam.

If the email never arrives, do not wait for it. Use WP-CLI or the file system, as below. The official page’s own fallback is renaming plugin folders over FTP.

How do I deactivate all plugins when I cannot log in?

Use WP-CLI with --skip-plugins, because plain WP-CLI loads the broken plugin and crashes with it. We tested both on the same broken site.

# checked on 16 Nov 2026 on WordPress 7.1.4, WP-CLI 2.12.0
wp plugin list --fields=name,status                       # fails: loads the broken plugin
wp plugin deactivate broken-plugin                        # fails with the same fatal error
wp plugin deactivate broken-plugin --skip-plugins         # works
wp plugin deactivate --all --skip-plugins                 # works, switches everything off

The first two commands died with the same “critical error” message as the site. The third printed “Plugin ‘broken-plugin’ deactivated” and the front page returned 200 straight after. The plugin deactivate reference lists the flags.

What if I only have FTP or a file manager?

Rename the plugin’s folder, or the whole plugins folder. That works, but we found a side effect the usual guides skip. We renamed two active plugin folders and then opened the Plugins screen. WordPress printed “The plugin mem-hog/mem-hog.php has been deactivated due to an error: Plugin file does not exist” for each one, and the active plugins list became empty. When we renamed the folders back, both stayed deactivated.

So renaming is a one-way switch for every plugin you touch. Write down which plugins were active before you rename the whole folder, or you will spend an hour working out which ones to turn back on. With WP-CLI you can save the list first:

wp option get active_plugins --format=json --skip-plugins > active-plugins.json

What if I only have database access?

Set the active plugins option to an empty array. The serialized form of an empty array is a:0:{}. Back up the table first, and use your real table prefix.

-- take a database backup first; replace wp_ with your table prefix
UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';

How do I find which plugin broke my site?

If the log names a file, you already have the answer. If it does not, split the active plugins in half and test. List them, switch off the first half, load the site, and keep halving. Eight plugins take at most three rounds.

wp plugin list --status=active --field=name --skip-plugins
wp plugin deactivate plugin-a plugin-b plugin-c plugin-d --skip-plugins

Keep a note of what you switched off. Test on staging when you can, and remember that two plugins that work alone can fail together, so a plugin that only breaks when another is active is a conflict, not a bug in either. Query Monitor helps once you can reach the dashboard: our Query Monitor tutorial shows how to see PHP errors per request.

How do I fix a white screen caused by my theme?

Switch to a default theme from the command line. A broken theme crashes WP-CLI the same way a broken plugin does, so skip themes as well.

# checked on 16 Nov 2026
wp theme list --skip-themes --skip-plugins --fields=name,status
wp theme activate twentytwentyfive --skip-themes

On the test site a theme with a fatal error in functions.php returned a 500 with the critical error message. After the second command, WP-CLI printed “Switched to ‘Twenty Twenty-Five’ theme” and the front page returned 200. Use a default theme that is actually installed on your site, which the first command shows. Without WP-CLI, rename the active theme’s folder in wp-content/themes and WordPress falls back to an installed default.

A child theme that is out of step with its parent is a common cause after updates. Check that the parent theme folder exists, is the right version and has the template files the child expects.

Is the white screen a memory limit problem?

Only if the log says so. The line to look for is “Allowed memory size of N bytes exhausted”. We triggered it with a plugin that filled an array, and the log read:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 134217736 bytes) in .../mem-hog.php on line 5

134217728 bytes is 128 MB, the limit on our test PHP. The page returned the same critical error message as any other fatal error, so the message alone does not tell you the cause.

WordPress picks its own limits in default-constants.php: WP_MEMORY_LIMIT defaults to 40M on a single site and 64M on multisite, and WP_MAX_MEMORY_LIMIT for admin work defaults to 256M. These are requests, not guarantees. WordPress tries to raise PHP’s memory_limit up to the constant, and if your host forbids that, PHP keeps its own number.

We showed this with PHP’s memory_limit at 64M, ini_set disabled as on a locked-down host, and WP_MEMORY_LIMIT set to 256M in wp-config.php. WordPress reported the constant as 256M, while PHP’s actual limit stayed at 64M. If raising the constant changed nothing, the host’s setting is the ceiling, and you raise it in the control panel, php.ini or by asking support. WooCommerce’s memory limit guide walks through those routes.

// wp-config.php, above the "That's all, stop editing!" line
define( 'WP_MEMORY_LIMIT', '256M' );

Raise the limit to get the site back, then find what used the memory. A plugin that needs 400 MB for a normal page view has a problem that a bigger number only hides.

What if the log shows a parse error or an undefined function?

Each message points at a different fix. These are standard PHP messages, and we saw the first and last of them on the test site.

Log message

What it means

Usual fix

Call to undefined function x()

Code calls a function that is not loaded

A plugin it depends on is off, or PHP removed the function. Update or replace the plugin

Parse error: syntax error

A file has invalid PHP

Restore the file from backup, or reinstall the plugin or theme

Cannot redeclare function x()

Two files define the same function

Two plugins or a copied snippet clash. Remove one

Uncaught Error: Call to a member function on null

Code expects an object that is missing

Update the plugin, or check what changed in PHP or WordPress

Allowed memory size exhausted

PHP ran out of memory

See the memory section above

Maximum execution time exceeded

A script ran longer than max_execution_time

Find the slow task; raise the limit only as a stopgap

A PHP upgrade is a frequent trigger. Plugins and themes that worked on an older PHP can call functions that were removed. A wordpress.org thread about an error on PHP 8.3 shows the typical pattern. Before your host changes the version, run through our PHP upgrade check.

If the cause is a plugin update, remember that core can help. WordPress 6.3 added rollback for failed manual plugin and theme updates, and a rollback for automatic plugin updates followed. They only help while an update is running, so an error that appears days later still needs the steps above.

What if there is no error in any log?

Then the code stopped without an error, or it died before logging worked. Two causes account for most of these.

  • A parse error in wp-config.php. We appended one broken line and the site returned a 500 with 0 bytes. WordPress had not started, so there was no handler and no message. The server’s PHP log still recorded it: “PHP Parse error: syntax error, unexpected token ‘;’ in wp-config.php on line 23”. Run php -l wp-config.php to check the file.
  • Code that stops on purpose. A plugin that calls exit or die without printing anything gave us a 200 response with an empty body and nothing in any log. Search recent code changes and snippets for exit and die, and check for a stray closing PHP tag followed by output.

A quick way to tell the cases apart from the command line:

curl -s -o /dev/null -w "%{http_code} %{size_download}\n" https://example.com/
# 500 0     -> PHP died before WordPress's handler, read the server log
# 500 2704  -> WordPress's critical error screen, read debug.log
# 200 0     -> code stopped silently, look for exit/die or an empty template

The 2704 is the size of that screen on our test site, so yours may differ slightly.

Could a corrupted core file or .htaccess be the cause?

Occasionally, after a failed update. Verify core against the official checksums, and reinstall core files without touching your content.

# checked on 16 Nov 2026
wp core verify-checksums
wp core download --force --skip-content --version=7.1.4
wp core verify-checksums

On the test site we appended a line to wp-includes/version.php. The first command printed “File doesn’t verify against checksum: wp-includes/version.php”, the second reinstalled core, and the third reported that the installation verifies against checksums. Use your own WordPress version in the download command. --skip-content leaves wp-content alone, and wp-config.php is not part of the download.

For a server 500 that has no PHP error behind it, rename .htaccess and reload. If the site comes back, re-save the permalinks to generate a clean file. A 500 with an Apache or nginx error page, not a WordPress one, points at the web server config, not at WordPress.

When only wp-admin is white, or only the front end

That narrows the culprit. A white front end with a working dashboard usually means the theme or a front-end-only plugin. A white dashboard with a working front end points at an admin-only plugin, an admin notice that fatals, or the memory used by the dashboard, which gets a higher limit through WP_MAX_MEMORY_LIMIT. Run the same checks for whichever side is broken.

How do I stop it happening again?

  • Test updates on a staging copy first. Most white screens in the wild follow an update or a PHP version change.
  • Keep one admin email you actually read, or set RECOVERY_MODE_EMAIL in wp-config.php to a monitored inbox.
  • Monitor the response size, not only the status. A check that expects a string from the page catches the 200-with-empty-body case that status checks miss.
  • Ship PHP errors to a log you can read and rotate it, so the first fatal line is easy to find.
  • Take a backup before every plugin or PHP change and know how to restore one.

A host-level rollback or the ability to flip PHP back one version is the fastest escape when an upgrade is the cause. Ask your host how before you need it.

Common mistakes people report

These are the problems that come up repeatedly in the WordPress forums, Trac and plugin documentation. Links checked on 16 November 2026.

  • Waiting for a recovery email that never arrives. A wordpress.org thread on no recovery email and Trac ticket #52560 describe it. The official recovery page lists the fallbacks.
  • Raising WP_MEMORY_LIMIT and seeing no change. The host’s PHP limit stays in charge. See the WooCommerce memory guide.
  • Renaming plugin folders and forgetting what was active. We saw the plugins stay deactivated after the folders were renamed back, as described above.
  • A white screen straight after a PHP upgrade. Removed functions in an old plugin or theme are the usual cause. See the PHP 8.3 error thread.
  • Leaving display errors on in production. It turns a white screen into a page that prints server paths for everyone. Log errors, do not display them, as the debugging handbook advises.
  • Editing wp-config.php and breaking the file. One missing semicolon gave us a blank 500. Always run php -l on it first.

Frequently asked questions

What causes the WordPress white screen of death?

A PHP error that stops the page before anything is printed. The usual sources are a plugin or theme fatal error, memory exhaustion, a parse error in a file you edited, or code that exits silently. The error log names the cause.

How do I fix the white screen without access to wp-admin?

Use WP-CLI with - skip-plugins and - skip-themes to switch off the culprit, or rename its folder over SFTP. Read the log first so you know which one to target.

Why does my site say there has been a critical error?

That is WordPress’s fatal error handler catching a PHP error and hiding the details from visitors. The same details go to the admin email and to your logs.

Does a white screen mean my site was hacked?

Usually not, but check. Run wp core verify-checksums, look for unknown administrators and unexpected PHP files in uploads. Our five-minute audit lists the checks.

Will deactivating all plugins delete my data?

No. Deactivating stops the code from loading. Plugin settings and content stay in the database. Reactivate one at a time to find the cause.

How do I find the error log on shared hosting?

Look in the hosting control panel for an error log or log viewer, or for a file named error_log in your site’s folder. If there is none, enable WP_DEBUG_LOG and read wp-content/debug.log.

Why is the page blank but the status is 200?

Something stopped the output on purpose, such as a plugin calling exit, or the template printed nothing. A blank 500 is a crash. A blank 200 is a silent stop.

How much memory does WordPress need?

The defaults are 40M for a single site and 64M for multisite, with 256M for admin tasks. Plugins like page builders and shop plugins often need more, so set it from what your site uses, not from a rule of thumb.

How we tested this

Everything marked as tested ran on a throwaway WordPress 7.1.4 install with the SQLite database plugin, PHP 8.5.5 and WP-CLI 2.12.0 on 16 November 2026, served by PHP’s built-in web server with errors logged and not displayed. We created small plugins and a theme that failed in specific ways and recorded the HTTP status, response size, log line and WP-CLI output. Hosting environments differ, so a shared host may show different pages, especially for memory and error display. Core behaviour for the handler, memory constants and recovery mode comes from the current WordPress development source. Our five-minute security audit is a good next step once the site is back.

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com