More fixes

"There has been a critical error on this website"

That one line is WordPress telling you the site crashed. It almost always comes from a single change: a plugin or theme that updated itself, or the host moving the site to a newer PHP version. The site is not deleted and the fix rarely means rebuilding anything. Below is a rebuilt example (not a real client) so you can see the broken page and the fixed one, then the safe order of steps.

What visitors see

yourbusiness.com

What the debug log says


  

First: check your email

Since WordPress 5.2, when the site crashes WordPress emails the site's admin address with the subject "Your Site is Experiencing a Technical Issue". That email names the plugin or theme that crashed and contains a recovery mode link. The link lets you log in to the dashboard with the broken plugin paused for you, so you can switch it off or roll it back. Look in spam too; it often lands there, or goes to an old address nobody reads.

The safe order of steps

  1. Back up first (files and database), even with the site down. Every step below can then be undone.
  2. Use the recovery link if you have the email. Deactivate the plugin it names, and the site comes back. Then decide: roll that plugin back one version, or replace it.
  3. No email? Read the error. Turn on WordPress's debug log (WP_DEBUG and WP_DEBUG_LOG in wp-config.php, display off so visitors see nothing) and reload the page once. The log in wp-content/debug.log names the file and line that crashed, as in the example above.
  4. Switch off only what the log names. In the host's file manager or over SFTP, rename that one plugin's folder (for example wp-content/plugins/booking-calendar to booking-calendar.off). WordPress deactivates it. Renaming the whole plugins folder works too, but it switches off everything at once, forms and caching included.
  5. Check what changed on the host's side. If nothing updated but the site still broke, the host may have moved you to a newer PHP version that an old plugin or theme cannot run on. Their control panel shows the PHP version; going back one version is a stopgap, updating or replacing the old code is the fix.
  6. Fix it properly, then test. Install the plugin's fixed version, or a maintained replacement, on a copy first. Then turn the debug log off again, and turn off automatic updates for anything that has broken the site before.

Common causes and what each one needs

What the log saysWhat it meansUsual fix
Fatal error: Uncaught Error: Call to undefined function in a plugin fileA plugin updated and now calls code another plugin or WordPress itself no longer hasRoll that plugin back one version, or update the plugin it depends on
Fatal error ... syntax error, unexpected or ... removed in PHP 8The host moved the site to a newer PHP version and old code cannot run on itUpdate or replace the old plugin/theme; PHP rollback only as a stopgap
Allowed memory size of ... bytes exhaustedA page needs more memory than the host allowsRaise WP_MEMORY_LIMIT if the plan allows it; find the heavy plugin
Error inside wp-content/themes/...The theme, or a code snippet pasted into it, crashedUndo the snippet, or switch to a default theme while it is repaired
Error during an update, site stuck in maintenanceAn update stopped halfwayRemove the .maintenance file, re-run the update cleanly

What not to do

If you are comfortable with a file manager, the steps above are usually enough. If the site earns you money every hour it is down, that is what the box below is for.