WordPress Fatal Error After PHP Update: How to Fix It Safely (2026)
If your site shows a fatal or critical error right after a PHP update, the quickest fix is to switch PHP back to the previous version in your hosting panel. Then read the error log to find the plugin or theme that is not compatible, update or replace it, and upgrade PHP again.
Newer PHP versions remove old features and are stricter about code errors. Old plugins and themes written for older PHP can crash on them. This guide shows a safe order of steps so you get the site back first and fix the cause second.
Step 1: Roll Back PHP
Log in to your hosting panel and find the PHP version setting (often called Select PHP Version or MultiPHP Manager). Choose the version that worked before and save. In most cases the site comes back at once. Do this first, because it removes the pressure while you investigate.
Step 2: Check Your Email and Recovery Mode
WordPress can detect a fatal error and email the admin address a recovery mode link. It also names the plugin or theme that caused the crash. If you received this email, open the link, log in and deactivate the item it names.
Step 3: Turn On the Debug Log
Add these lines to wp-config.php, above the line that says to stop editing:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page, then open wp-content/debug.log. The last error shows the file path. If the path contains /plugins/ or /themes/, the folder name tells you what is incompatible. Turn debugging off again when you are done.
Step 4: Deactivate or Update the Culprit
If you cannot open wp-admin, rename that plugin folder with FTP or your file manager, for example from plugin-name to plugin-name-off. Then check for an updated version that supports your PHP version, or look for an alternative. The same method is explained in our plugin conflict guide.
Step 5: Update WordPress Core, Themes and Plugins
Many PHP errors disappear after updating. Back up first, then update WordPress, your theme and all plugins. If an update itself fails, see our update failed guide.
Step 6: Upgrade PHP the Right Way
- Make a full backup of files and database
- Test on a staging copy of the site if your host offers one
- Check that your WordPress version supports the PHP version you want
- Upgrade PHP, then browse the site and the admin area and read the debug log
- Keep the old version available until you are sure everything works
If you only see a blank page, read our white screen of death guide as well.
Common Causes
- An abandoned plugin or theme that was never updated
- Code that uses functions removed in newer PHP
- Stricter handling of null values and errors in PHP 8
- A custom code snippet in functions.php
- An outdated WordPress version on a very new PHP version
Verified Facts and Sources
The recovery steps follow the WordPress documentation on PHP compatibility, fatal error recovery mode and debugging. The cause list matches what WordPress support threads and core tickets describe. We did not break a test site with a PHP update while writing this article.
- WordPress Core: PHP compatibility and WordPress versions
- WordPress Core: PHP and fatal error recovery mechanisms
- WordPress Core: WordPress 5.9 and PHP 8.0 and 8.1
- Debugging in WordPress (Advanced Administration Handbook)
Frequently Asked Questions
Why does my WordPress site crash after a PHP update?
Some plugins and themes use code that newer PHP versions no longer allow, so they cause a fatal error when PHP is upgraded.
How do I get my site back quickly?
Switch PHP back to the previous version in your hosting panel. This normally restores the site immediately.
How can I find which plugin is incompatible?
Enable the debug log in wp-config.php and read the last error in wp-content/debug.log. The file path shows the plugin or theme name.
Should I stay on an old PHP version?
Only temporarily. Old PHP versions stop getting security fixes, so replace the incompatible plugin or theme and upgrade again.
Updated December 2, 2026.
More WordPress Error Fixes
- 500 Internal Server Error: Fix the 500 error
- Critical Error on This Website: Fix the critical error message
- White Screen of Death: Fix the blank white page
- Database Connection Error: Fix Error establishing a database connection
- Memory Limit Error: Fix Allowed memory size exhausted
- Update Failed: Fix a failed WordPress update
- 404 After Changing Permalinks: Fix pages showing 404
- Parse and Syntax Error: Fix parse errors from code edits
- Maximum Execution Time Exceeded: Fix timeouts
- Locked Out of WordPress: Reset your admin password
- Headers Already Sent: Fix the headers already sent warning
- Plugin Conflict: Find the plugin causing the problem
- Too Many Redirects: Fix ERR_TOO_MANY_REDIRECTS
- Login page refreshing: fix the wp-admin redirect loop
- Mixed content error: fix the Not Secure warning after HTTPS
- WordPress not sending emails: fix contact form and reset mail