Skip to content

WordPress

Recover from a WordPress critical error

Rename plugins, confirm the site loads, then use the error log to find the file that failed.

Updated Aug 29, 20263 min read8 reads
Recover from a WordPress critical error
Rename first so you keep the files and the error trail.

A WordPress critical error means PHP stopped before the site could load a page. You can usually recover by renaming the plugins folder in File Manager, checking whether the site returns, and then reading the error log for the exact file path.

Common causes include a bad plugin update, a low memory limit, or a missing file after a partial restore. You rarely need a full WordPress reinstall. File Manager or SSH plus the log is enough in most cases.

Rename the plugins folder

  1. Open cPanel, then File Manager, and go to public_html/wp-content/.
  2. Rename the plugins folder to plugins.off, or rename one suspect plugin folder to something like plugin-name.off.
  3. Load the site in a private window. If the page returns and WordPress notes missing plugins, that is a good sign.
  4. Rename plugins.off back to plugins. Then rename suspect folders one at a time until the fatal error comes back. The last folder you changed is the cause.

Must-use plugins live in wp-content/mu-plugins and still load when you rename plugins. If the error remains, check that folder next. You can also rename the active theme folder so WordPress falls back to a default theme when one is installed.

Read the log

bash
tail -n 80 ~/public_html/error_log
# or
tail -n 80 /home/USER/logs/error_log

Look for a PHP Fatal line with a path under wp-content. That path points to the plugin or theme at fault. A fatal inside wp-includes after a partial update usually means core files need a restore from a known-good copy or JetBackup. Do not drop a random WordPress zip over a live database.

On a VPS, journalctl is not your PHP error log. Use the path set for error_log in MultiPHP INI. If the failure is not PHP at all, see A 500 that is not PHP.

If you need yesterday

JetBackup, or a VPS snapshot, is the clean way to rewind. Restore wp-content/plugins, or a single database table if the fault is there. Avoid restoring the whole home directory unless that is what you intended. Preview on a temporary URL when you have one, then open wp-admin and leave the bad plugin off until it is patched.

Once the WordPress critical error is gone, update or remove that plugin. Take a backup you could restore for real. WP Toolkit staging lets you test the next update without risking production.

In short, treat a WordPress critical error as a fatal in a file. Rename the folder, load the site, read the log, and restore only what you must. If the error started right after a version change, see PHP 8.4 in cPanel.

Share

Send this article

Need someone else to do this? Send them the link — the commands are in the article.

Was this article helpful?

Be the first to rate this article.