- IN THIS ARTICLE
You clicked Update, and now your site shows one line: “There has been a critical error on this website.” It looks final. It is not. This message means PHP hit a fatal error and WordPress stopped loading to protect itself. Your content and database are almost certainly fine.
Here is how to find what broke and fix it, starting with the quickest options.
What causes the critical error
In nearly every case, one piece of code is incompatible with something else. The usual triggers are:
- A plugin update that clashes with another plugin or your theme
- A PHP upgrade by you or your host, where older code uses functions newer PHP no longer allows
- A WordPress core update. For example, after WordPress 7.1 launched in August 2026, some sites using WP Rocket hit a critical error that locked owners out of their dashboard
- A theme update, especially with custom code in functions.php
- Low PHP memory on budget hosting
Step 1: Check your email for the recovery link
WordPress sends an email to the site’s admin address when a fatal error happens. It names the plugin or theme at fault and includes a recovery mode link. Click it, log in, and WordPress will load with the faulty extension paused. Deactivate it, then visit the site to confirm it is back.
No email? Check spam, or the address may be one nobody monitors. Move to Step 2.
Step 2: Turn on debugging to see the real error
Open wp-config.php through your host’s file manager or SFTP. Just above the line that says “That’s all, stop editing”, add:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
Reload the site, then open /wp-content/debug.log. The last “PHP Fatal error” line tells you the file path, which names the plugin or theme. Turn debugging off again when you are done.
Step 3: Disable the plugin without the dashboard
In /wp-content/plugins/, rename the folder of the plugin named in the log, for example wp-rocket to wp-rocket-off. WordPress deactivates it instantly. If you do not know which one, rename the whole plugins folder, check the site loads, then rename it back and reactivate plugins one at a time.
Step 4: Rule out the theme
If the log points to your theme, rename its folder in /wp-content/themes/. WordPress falls back to a default theme, as long as one is installed. Keep one default theme on every site for exactly this reason.
Step 5: Roll back the PHP version
If the error started right after a PHP change, switch back to the previous version in your hosting panel. This buys time, not a fix. PHP 8.1 reached end of life on 31 December 2025, so plan to update the incompatible plugin or replace it, then move up again.
Step 6: Raise the memory limit or restore a backup
If the log mentions “Allowed memory size exhausted”, add define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); to wp-config.php or ask your host. If none of the steps work, restore the backup taken before the update. That is why the backup comes first, every time.
How to avoid the next critical error
- Take a backup before every update, not after
- Test major updates on a staging copy first
- Update one plugin at a time on important sites, so you know what caused a problem
- Check a plugin’s “Tested up to” version before a major WordPress release
- Keep the admin email pointed at an inbox someone reads
FAQS
Have I lost my website content?
Almost certainly not. The error stops code from running. Your posts, pages and orders sit safely in the database.
Why is my dashboard also broken?
The failing code loads on both the front end and the admin. Recovery mode or renaming the folder gets you back in.
Can I just roll back the plugin?
Yes. Replace its folder with the previous version from a backup or the plugin’s Advanced View page on WordPress.org, then wait for a fixed release.
Is it safe to leave debugging on?
No. Turn it off once you have fixed the issue, because log files can expose server paths.
Let us handle the updates
WP Miracle plans include backups before every update, staging tests for major releases and a fast fix if anything breaks. You get the updates without the 11pm panic.





