If you’ve ever run a WordPress site, you’ve probably seen the dreaded message:
“There has been a critical error on this website.”
Yikes. That’s scary, right? Even scarier when it shows up right after you upgrade your PHP version. But don’t worry—this guide breaks it down in simple steps. You’ll fix it, fast!
Why Did This Happen?
WordPress needs PHP to run. When PHP is upgraded, some parts of your website might not be ready for the change.
It’s like putting new fuel in an old car—it might not run unless you make some adjustments.
Common causes include:
- Outdated themes or plugins
- Incompatible PHP code
- Old WordPress version
Now let’s fix it!
Step 1: Turn on Debug Mode
We need more info about what’s broken. WordPress hides the real error to keep hackers out. But you need the details.
Open wp-config.php in your site’s root folder. Find this line:
define( 'WP_DEBUG', false );
Change it to this:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
This won’t show errors on your site (just in case people are watching), but it will log the errors to a file.
That file is wp-content/debug.log.
Step 2: Check the Error Log
Now visit your website again. Then look at that debug log.
It will tell you exactly what file or plugin is causing the problem.
Common errors:
- Call to undefined function
- Class not found
- Syntax errors
Don’t worry if it looks scary—it’s just code speak for “something doesn’t match with the new PHP.” Look for plugin or theme names in the error message.
Step 3: Disable Problem Plugins
Now that we know which plugin (or theme) is at fault, we’ll deactivate it.
Can’t get into admin dashboard? No problem. Use FTP or your web host’s file manager:
- Go to wp-content/plugins/
- Find the problem plugin folder
- Rename the folder (e.g., append “_off” to the name)
Done! That disables the plugin.
Now reload your website. If it loads—congrats! You found the culprit.

Step 4: Update Everything
If a plugin broke your site, it’s probably outdated. Time to hit that update button.
In your WordPress dashboard, go to:
Dashboard → Updates
Update:
- WordPress itself
- All themes
- All plugins
Once updated, try enabling the plugin again. If it still breaks… you may need to replace it. Some plugins don’t survive PHP updates—especially older ones.
Step 5: Roll Back If Needed
If things are really broken and nothing’s working—roll back your PHP version. Temporarily.
Most web hosts let you switch PHP versions in their control panel. Go back to the old version for now (e.g., from PHP 8.0 back to 7.4).
This brings your site back to life. Then you get more time to update things safely.
Step 6: Use a Compatibility Checker
Before upgrading PHP again, use a plugin like:
- PHP Compatibility Checker
- Health Check by WordPress
These tools scan your site and warn you about anything that won’t work with newer PHP versions.

Bonus Tip: Use a Staging Site
You know what’s safer than fixing a live site? Fixing a copy of your site!
Many hosts offer staging environments. This lets you test updates without breaking your real site.
No staging? Use a plugin like WP Staging to create a duplicate site.
Checklist: Did You…?
- Enable WordPress debug mode?
- Check the log file?
- Disable the problem plugins or themes?
- Update everything?
- Try rolling back PHP temporarily?
If yes—you’re on your way to a fixed website!
Still Not Working?
Some errors are deep and need a developer’s touch. If all fails, here are your backup options:
- Hire help from sites like Codeable or Upwork
- Reach out to your host’s tech support
- Find help in WordPress forums
But most of the time, the steps above are enough to get things up and running again.
How to Avoid This Next Time
Upgrading PHP is good. It makes your site faster and more secure. But next time, prepare:
Here’s how:
- Back up your site before any PHP upgrade
- Check compatibility with a plugin checker
- Update everything first
- Test on staging site if you can

Final Thoughts
The “critical error” might seem like a monster—
But now you know how to slay it.
In fact, fixing it is just a matter of spotting what broke, disabling it, and updating your tools.
So breathe easy. Your site can be back and better than ever.
Happy troubleshooting!