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

  1. Open the recovery mode email if WordPress sent one, because it often points directly to the plugin or theme involved.
  2. Enable WP_DEBUG_LOG and read the newest fatal error entries in wp-content/debug.log or the server PHP log.
  3. Disable the last changed plugin, theme, or custom code block and test whether the critical error disappears.
  4. Compare the active PHP version with the compatibility requirements of WordPress core, the theme, and the failing plugin.
  5. Reinstall the affected extension or restore the last known good deployment if files are missing or partially updated.
  6. If the error references memory or timeout limits, raise the relevant PHP limits and retry the failing workflow.
  7. Check autoloaders, Composer output, and custom include paths if the failure mentions missing classes or required files.
  8. Re-enable components one at a time and repeat the exact action that triggered the error so you verify the real fix.
  9. After recovery, remove obsolete extensions and document version compatibility before the next update cycle.