A blank white page, or WordPress’s message There has been a critical error on this website, means PHP hit a fatal error and stopped before it could draw the page. The cause is nearly always a plugin, the theme, a PHP version change, or PHP running out of memory. The error is recorded; you just need to turn on the log that shows it.
If you are visiting the site
Nothing on your side will fix it. Try again later.
If you run the site
Start with whichever of these you can reach: your email, the server’s files, or WP-CLI.
1. Check your email for recovery mode
Since WordPress 5.2, a fatal error triggers an email to the site’s admin address, titled Your Site is Experiencing a Technical Issue. It names the plugin or theme that failed and includes a recovery mode link. That link logs you in with the faulty plugin paused, so you can deactivate, update or replace it from the dashboard.
Check the spam folder too. If the email never arrives, the site may not be able to send mail; see why emails go to spam.
2. Turn on the debug log
Add these lines to wp-config.php, above the line that says That’s all, stop editing:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page, then read the end of the log:
tail -n 30 wp-content/debug.log
A fatal error looks like this:
PHP Fatal error: Uncaught Error: Class "Some_Class" not found in /var/www/example.com/public/wp-content/plugins/some-plugin/some-plugin.php:27
The folder after plugins/ or themes/ names the culprit. Set WP_DEBUG back to false when you are done, since the log can grow large and may reveal file paths.
3. Match the error to the cause
| Log says | Cause | Fix |
|---|---|---|
Uncaught Error: Call to undefined function or Class ... not found in a plugin | Plugin broken or incompatible | Step 4 |
| The same, in a theme folder | Theme broken, or a child theme missing its parent | Step 5 |
Allowed memory size of ... bytes exhausted | PHP memory limit too low | Step 6 |
syntax error, unexpected | A typo, often in functions.php after an edit | Undo the edit |
| Errors that started after a PHP upgrade | Old code not compatible with the new PHP version | Step 7 |
4. Switch plugins off without the dashboard
Over SSH or SFTP, rename the plugins folder, which deactivates every plugin at once:
cd wp-content
mv plugins plugins-off
If the site returns, rename it back to plugins, then rename plugin folders one at a time until the site breaks, which identifies the culprit. With WP-CLI it is quicker:
wp plugin deactivate --all
wp plugin activate plugin-name
Activate them one by one and reload the site after each. With a plugin you have identified, check for an update or a known issue on its support page before reactivating it.
5. Switch to a default theme
wp theme activate twentytwentyfive
Without WP-CLI, rename your theme’s folder in wp-content/themes/; WordPress falls back to an installed default theme. If that fixes it, the theme is at fault. An edit to functions.php is the most common reason: undo it, or restore the file from a backup.
6. Memory exhausted
Allowed memory size of 134217728 bytes exhausted means the page needed more than PHP’s memory limit (134217728 bytes is 128 MB). Raise WordPress’s limit in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
WordPress cannot go above the server’s own memory_limit, so raise that in php.ini or the PHP-FPM pool too, then restart PHP-FPM. If a page needs much more than 256 MB, a plugin is usually doing something wasteful, and the memory only hides it.
7. After a PHP upgrade
Plugins and themes that have not been updated in years can fail on newer PHP versions. Update everything first. If a critical plugin still fails, switch the site back to the previous PHP version from your control panel while you find a replacement, then upgrade again.
Only the admin area is white
The same steps apply: a plugin that only loads in the dashboard is usually the cause. Recovery mode and the debug log work for the admin area too.
Confirm it is fixed
Load the home page, a post, and the admin area in a private window. Then check debug.log is not still collecting errors, and switch debugging off.
Prevent it
- Update plugins on a staging copy first, or at least one at a time, so you know which update broke the site.
- Keep backups you can restore quickly.
- Remove plugins you no longer use; every one is a chance for a fatal error.
Related
- 500 Internal Server Error, the same fatal error with a different page.
- Error establishing a database connection.
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.

