Introduction
When WordPress says There has been a critical error on this website, it is hiding a fatal PHP error behind a safer message. That protects visitors from raw stack traces, but it means you need logs and recent change history to get to the real root cause.
Symptoms
- WordPress shows the generic critical error message
- wp-admin, the front end, or both stop working after an update
- The failure started after changing PHP version or plugin code
- Recovery mode emails may arrive with a plugin or theme reference
- Error logs mention uncaught exceptions or fatal PHP failures
Common Causes
- A plugin or theme is incompatible with the current PHP version
- A recent update introduced a fatal bug or missing dependency
- Custom code in snippets or templates references removed functions
- Memory exhaustion or timeouts break execution during boot
- A partial deployment left classes or autoload files out of sync
Step-by-Step Fix
- Open the recovery mode email if WordPress sent one, because it often points directly to the plugin or theme involved.
- Enable
WP_DEBUG_LOGand read the newest fatal error entries inwp-content/debug.logor the server PHP log. - Disable the last changed plugin, theme, or custom code block and test whether the critical error disappears.
- Compare the active PHP version with the compatibility requirements of WordPress core, the theme, and the failing plugin.
- Reinstall the affected extension or restore the last known good deployment if files are missing or partially updated.
- If the error references memory or timeout limits, raise the relevant PHP limits and retry the failing workflow.
- Check autoloaders, Composer output, and custom include paths if the failure mentions missing classes or required files.
- Re-enable components one at a time and repeat the exact action that triggered the error so you verify the real fix.
- After recovery, remove obsolete extensions and document version compatibility before the next update cycle.