What the message means
WordPress shows “There has been a critical error on this website” when a fatal PHP error occurs while the page is loading. In the past the page then simply stayed white. Since version 5.2, WordPress catches such errors and offers administrators a way out; the message itself has been around since version 5.3.
If the error appears right after an update, that update is the most likely suspect.
- 01
Your content is not gone
Pages, posts, images and settings sit unchanged in the database. What is broken is the code that displays them.
- 02
It is usually one spot
A plugin, the theme, or two extensions that no longer get along after the update.
- 03
No update carried out?
Then check your inbox: hosts switch PHP versions regularly and announce it by email.
Recovery mode
WordPress’s built-in way out. It works as long as the email arrives and the link is still valid.
- Step 01
Email to the admin address
In it, WordPress names the plugin or theme that caused the error and sends a link to recovery mode.
- Step 02
Paused only for you
You log in via the link. The faulty extension is paused only in your session; visitors still see the message.
- Step 03
Repair and exit
Deactivate the plugin, update it or replace it with the older version, then exit recovery mode and check the site from the outside.
The link is only valid for a limited time. If it has expired or the email never arrived, the route via the files helps.
Switching plugins off by hand
If no email arrives, it is often down to the server’s email sending or an outdated admin address. Then you switch the extension off directly via the files, by FTP or with the file manager in your hosting account. No data is lost: settings and content stay in the database.
Switch off one plugin
Under wp-content/plugins/, rename the folder of the suspect plugin. WordPress no longer finds the files and deactivates the plugin.
wp-content/plugins/elementor → elementor-offSwitch off all plugins
Rename the entire plugins folder. If the website loads again, rename it back and activate the plugins one by one in the admin until the error comes back.
wp-content/plugins → plugins-offSwitch off the theme
Rename the folder of the active theme. WordPress switches to a bundled default theme, provided one is installed. The site looks different, but it loads.
wp-content/themes/my-theme → my-theme-offFinding the cause
Instead of guessing, look at the error log. It names the file in which PHP stopped, and the path almost always gives away the plugin or theme.
In wp-config.php, before the line that says to stop editing:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false ); The errors end up in wp-content/debug.log, and visitors do not see them. Afterwards, switch debugging off and delete the file: it sits in the publicly reachable area. Many hosts also show a PHP error log in your hosting account.
“Allowed memory size … exhausted”The PHP memory limit is not enough. An update has increased the demand, and the limit can be raised at your host.
“Call to undefined function” / “Class not found”An extension expects something that is missing: another plugin in a matching version, or a PHP function that does not exist in your PHP version.
“syntax error, unexpected …”Often a sign that the code requires a newer PHP version than the server provides.
The typical causes
When a website breaks after an update, in my experience one of these five spots is behind it.
Plugin conflicts
Two plugins access the same functions. After an update to one of them, they no longer fit together, even though each works on its own.
PHP version
New plugins require newer PHP, old ones no longer run on new PHP. Many hosts let you set the PHP version back temporarily. That buys time, but it is not a solution.
Page builders and add-ons
Builders and their add-on packs are closely linked. If the add-on does not follow a builder update, it breaks. For a broken layout, regenerating the CSS files and clearing caches often helps.
Interrupted update
If an update aborts, the maintenance message stays up. Then delete the .maintenance file in the root directory and apply the update again.
Caches
A caching plugin, the host’s cache or a CDN sometimes still shows the error state even though it has been fixed. Clear all layers before you search further.
Roll back a version or restore a backup
Once it is clear which update is to blame, only that one is rolled back.
Plugins from the directory
On the plugin’s page at wordpress.org, older versions can be downloaded under the advanced view. Upload in the admin or replace the folder via FTP.
Premium plugins
Older versions are usually available in your account with the vendor.
With WP-CLI
Back to the version you want with one command:
wp plugin install <plugin> --version=<version> --force
A full backup
It resets everything to the state of the backup, including content, contact inquiries or orders received since then. Always restore files and database together from the same backup.
And: a rolled-back security update only helps temporarily. The vulnerability is then open again, until the cause is fixed and the update applied again.
So it does not happen again
- 01Before every update, a backup whose restore has been tried at least once.
- 02Apply updates to a copy first. Things are allowed to break there.
- 03A fixed order: core, plugins (big ones individually), theme, translations.
- 04After every update, briefly check what counts: forms, checkout, mobile view.
- 05Test your host’s PHP switches on the copy beforehand.
More on the routine in the guide Updating WordPress safely, and the options for a test copy in the staging comparison.
I meet automated attacks with automated defense: updates go out quickly and regularly, but only after a test on an exact copy of the website.
How I prevent this with the Doppelgänger
For my clients I apply every update to the Doppelgänger first, an exact copy of the website on a server of its own in Germany. If an error shows up there, I fix the cause before anything goes live.
On the copy first
A critical error shows up on the Doppelgänger, and the live website stays untouched.
PHP before your host
I test new PHP versions on the Doppelgänger before your host switches.
Back in seconds
Every release is a version of its own. If something still goes wrong, the previous state is back in seconds.
Checked every night
The nightly security checks test whether the live website is reachable and running unchanged.
What this looks like in detail is on the page The Doppelgänger for WordPress.
Quick answers.
What does “There has been a critical error on this website” mean?
A fatal PHP error occurred while the website was loading, and instead of a white page WordPress shows this message. The cause is almost always a plugin, the theme or a PHP version an extension cannot cope with. Your content is not lost.
I did not get an email with the recovery link. What now?
First check the spam folder and whether the admin address in the WordPress settings is still current. If nothing arrives, switch off the most recently updated plugin by renaming its folder under wp-content/plugins via FTP or your host's file manager.
Is any data lost when I rename the plugin folder?
No. WordPress only deactivates the plugin because it can no longer find the files. Settings and content stay in the database. If you rename the folder back, you can activate the plugin again.
How do I find out which plugin is causing the error?
Fastest via the error log. With WP_DEBUG and WP_DEBUG_LOG in wp-config.php, WordPress writes errors to the file wp-content/debug.log, and many hosts also show a PHP error log in your hosting account. The path in the error message usually names the plugin. Switch debugging off again afterwards.
Can I roll a plugin back to its previous version?
Yes. For plugins from the official directory, older versions can be downloaded from the plugin's page at wordpress.org and installed, and with WP-CLI it also works by command. Premium plugins usually offer older versions in your account with the vendor. But this only helps temporarily: with the older version, the vulnerability the update was meant to close is open again.
How do I stop an update from taking my website down?
With a verified backup before every update, a test on a copy of the website and a fixed order in which big plugins are updated one at a time. That is exactly what the Doppelgänger takes care of: every update runs on an exact copy first, and only the tested version goes live.