About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
When a WordPress site shows "There has been a critical error on this website. Please check your site admin email inbox for instructions.", PHP has hit a fatal error and WordPress has stopped serving the page. The message itself names no cause. The cause is in the email WordPress sent to the site administrator and in the PHP error log, so read those first and change only the one thing they name.
What the symptom means
WordPress documents this message on its Common WordPress Errors page: "this indicates that something in your site has caused a critical error that prevents WordPress from running as expected." The page lists the usual causes: "conflicts between plugins, compatibility issues with your theme, running an incompatible PHP version, hitting the memory limit, or having corrupted WordPress files".
The behaviour comes from the fatal error handler introduced in WordPress 5.2. The Editing wp-config.php page says it "displays error message instead of white screen when plugins causes fatal error" and gives the other wording of the same screen: "The site is experiencing technical difficulties. Please check your site admin email inbox for instructions." Either wording points to the same mechanism.
The 5.2 announcement explains what happens next. When a fatal error occurs, "an email will be sent to the admin email address, informing about the issue and including a secret link to new feature called the “recovery mode”". In recovery mode the extensions "which are causing a fatal error are paused for that client", so the administrator can log in and act. The post adds: "It is impossible to automatically fix such errors, but recovery mode allows working around them by pausing the broken extensions."
If you never received the email, the site's mail may be failing, or the administrator address may be wrong. You can still find the error in the log, as below.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| A plugin broke after an update or install | The error began right after a plugin change; the error names a path under wp-content/plugins/ |
The log line or recovery mode screen names that plugin |
| A theme is incompatible | The error began after a theme change or WordPress update; the path is under wp-content/themes/ |
The same, naming the theme |
| PHP version does not match the code | The error began after a PHP upgrade or downgrade | The log names a function or syntax the PHP version does not support |
| Memory limit reached | The log says the allowed memory size was exhausted | See PHP "Allowed memory size of ... bytes exhausted" |
| Damaged or incomplete WordPress files | The path is under wp-admin or wp-includes, for example after an interrupted update |
The log names a core file; the files differ from a fresh download |
| Database problem | The log names a database error, or the site shows a different database message | See WordPress "Error establishing a database connection" |
Prove the cause before changing anything
1. Read the email. Check the inbox of the site administrator address, including spam. The page says "check your email to see if WordPress has sent you any details about the error". The message carries the recovery link and the error detail.
2. Read the PHP error log. Your host's error log (the PHP error_log setting, or the web server's error log) records fatal errors with the file path and line number. If you cannot find one, use step 3.
3. Turn on WordPress debug logging, briefly. The Debugging in WordPress page warns: "It is not recommended to use WP_DEBUG or the other debug tools on live sites; they are meant for local testing and staging installs." If you have a staging copy, use it. If the live site is down anyway, use the form below, which logs to a file and hides messages from visitors. Save the file first, outside the web root, because wp-config.php holds the database password and a copy inside the site folder can be downloaded as plain text. Then check it for syntax errors:
cp -p wp-config.php /root/wp-config.php.2026-11-20
php -l wp-config.php
Risk: the log can contain file paths and details about your site, and keeping WP_DEBUG on in production is not recommended. Remove the WP_DEBUG lines you add below when you have the error. To back out, restore the copy you saved: cp -p /root/wp-config.php.2026-11-20 wp-config.php, then php -l wp-config.php. If a different wp-config.php change was made meanwhile, apply it again.
Add these lines before the line that begins /* That's all, stop editing!, as the page directs:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Run php -l wp-config.php again (-l is "Syntax check only (lint)" in the PHP manual) and load the failing page once. The page says the log is saved to debug.log in the content directory, "usually wp-content/debug.log". You can instead give WP_DEBUG_LOG a file path to save it elsewhere.
4. Read the log line. Look for the line that names a fatal error and a file. A path under wp-content/plugins/NAME/ points at a plugin, wp-content/themes/NAME/ at a theme, and wp-admin or wp-includes at core files. The path tells you which fix below applies.
Fix
Plugin or theme
Use the recovery link from the email. The 5.2 post says that after you log in, "an admin notice will indicate that recovery mode is enabled" and you are "informed about which plugins/themes are currently paused due to fatal errors, and what exactly these errors are". From there you can deactivate the extension, fix it, or raise a ticket with its author.
Risk: deactivating a plugin turns off whatever it does (checkout, forms, caching) until it is fixed. Note what it did before you deactivate it. To back out, activate it again once its author has a fixed version.
If you cannot reach the administration screens at all, the FAQ Troubleshooting page gives two methods to deactivate all plugins.
Disruptive step: the file method below renames the plugins folder; every plugin is off while the folder has the new name, so the site loses all plugin functions.
The file method is to "Rename the plugins folder" in wp-content to something like plugins.hold. Record what is there first, then rename:
ls -l wp-content/plugins
mv wp-content/plugins wp-content/plugins.hold
To back out, rename it back:
mv wp-content/plugins.hold wp-content/plugins
Expect to reactivate plugins one at a time: the page says "This restores the folder, but all plugins will remain deactivated, and you can reactivate them individually."
The other method edits the active_plugins row of the options table. Copy the original value somewhere safe first, because that value is the list of what was active, and overwriting it loses the list.
Risk: setting option_value to a:0:{} deactivates every plugin at once.
Then set option_value to a:0:{}.
To back out, put the copied original value back into option_value, then reactivate and test each plugin you need.
PHP version
If the error began after a PHP change, the log will name a function or syntax that the running PHP version does not accept. Before you change anything, write down the PHP version the site runs now and the pool file or handler setting that selects it.
Disruptive step: returning the site to the previous PHP version changes the version every script on the site runs on. To back out, switch back to the version you wrote down.
Either update the plugin or theme to a release that supports the PHP version, or return the site to the previous PHP version while you do. How you switch versions depends on your hosting setup.
Memory limit
If the log reports that the allowed memory size was exhausted, follow PHP "Allowed memory size of ... bytes exhausted". Raise memory_limit only after finding what used the memory.
Damaged WordPress files
The Common WordPress Errors page gives this advice under its "Internal Server Error" heading, as one of several things to try, not under the critical error message: "Try re-uploading the wp-admin and wp-includes folders from a fresh install of WordPress." Do not overwrite wp-config.php or wp-content, and use the same WordPress version as the site. Save the current folders first, outside the web root, from the directory that holds wp-admin:
cp -a wp-admin /root/wp-admin.2026-11-20
cp -a wp-includes /root/wp-includes.2026-11-20
Disruptive step: replacing these folders overwrites every core file in them, and any file you or a plugin changed there is lost. To back out, move the fresh folders aside and copy the saved ones back under their original names:
mv wp-admin wp-admin.fresh
cp -a /root/wp-admin.2026-11-20 wp-admin
mv wp-includes wp-includes.fresh
cp -a /root/wp-includes.2026-11-20 wp-includes
Database errors
If the failure is a database connection problem, follow WordPress "Error establishing a database connection": check wp-config, then the database server. Do not run WordPress's repair feature until you have a backup.
Example (illustrative): shop.example.com on web01 shows the critical error message at 09:12, ten minutes after a plugin update. The administrator's email arrives with a recovery link. In recovery mode the notice says one plugin, example-seo, is paused because of a fatal error, and names a file under wp-content/plugins/example-seo/. The administrator deactivates that plugin, the front page returns, and a support ticket goes to the plugin's author. WordPress debug lines were never needed, and wp-config.php was left unchanged.
Confirm the fix
- The front page and one deep page load without the critical error message.
- A page that uses the plugin or theme you changed behaves as expected, such as a form submission or a checkout in a test mode.
- The administration screens load, and no new fatal line appears in the error log when you load them.
- If you turned debug logging on, all four debug lines are removed,
php -l wp-config.phpreports no syntax errors, and the log file is moved out of the way or protected.
What to watch afterwards
- Test plugin, theme and WordPress updates on a staging copy first, and update one at a time so the cause is obvious.
- Keep the administrator email address working and monitored. Without it, the recovery link does not reach anyone.
- Watch the PHP error log for new fatal lines after every update and after every PHP version change.
- Keep a current backup so a bad update can be undone without rebuilding the site.
Read next
Related articles you may want next.
- TroubleshootingPHP "Allowed memory size of ... bytes exhausted": raise memory_limit only after finding the causePHP 'Allowed memory size of N bytes exhausted': find the memory_limit that applies to PHP-FPM, find the cause, then raise it safely or fix the code.Read article
- TroubleshootingWordPress "Error establishing a database connection": check wp-config, then the database serverWordPress 'Error establishing a database connection': check DB_NAME, DB_USER, DB_PASSWORD and DB_HOST, then test the database server with mysqladmin ping.Read article
- Troubleshootingnginx 502 Bad Gateway: connect() failed (111: Connection refused) while connecting to upstreamnginx 502 Bad Gateway with connect() failed (111: Connection refused) while connecting to upstream. Match the error log line to the cause and fix it.Read article
Risks and limits
- These commands have not been run or lab-tested.
- Recovery mode pauses extensions only for the browser that entered it. Other visitors keep seeing the broken site until the cause is fixed.
- The WordPress pages describe the plugin, theme, PHP, memory and file causes in general terms. They do not give a ranking of which is most common.
- The fatal error handler can be disabled with
WP_DISABLE_FATAL_ERROR_HANDLER. If someone set it totrue, recovery mode is disabled (the wp-config.php page says so), so do not expect the recovery email and link. - Host-specific tools (control panels, managed hosting dashboards, command-line management tools) are not covered.
Sources
- Common WordPress Errors — WordPress Developer Resources, last updated October 14, 2026, accessed 20 November 2026
- Debugging in WordPress — WordPress Developer Resources, last updated October 14, 2026, accessed 20 November 2026
- Editing wp-config.php — WordPress Developer Resources, last updated October 14, 2026, accessed 20 November 2026
- FAQ Troubleshooting — WordPress Documentation, last updated July 3, 2026, accessed 20 November 2026
- Fatal Error Recovery Mode in 5.2 — Make WordPress Core, April 16, 2019, accessed 20 November 2026
- PHP manual: Command line options — PHP documentation, no date shown, accessed 20 November 2026
This article was originally published on .