Fix “there has been a critical error on this website”
WordPress caught a fatal error. Find which plugin caused it and get back in.
That message means PHP stopped with a fatal error and WordPress showed its recovery page instead of a blank screen. The cause is in the log.
Read the error
Sites → Logs → PHP errors. The newest entry names the file and line. The plugin or theme directory in that path is the culprit.
PHP Fatal error: Uncaught Error: Call to undefined function wc_get_product()
in /home/site/public/wp-content/plugins/some-addon/init.php:88Get back in
- Check the recovery email
WordPress emails the admin address a link that logs you in with the offending plugin paused.
- Or disable it over SSH
If you cannot reach wp-admin at all.
wp plugin deactivate some-addon
wp plugin list --status=activeCommon causes
- A plugin updated to a version that needs a newer PHP than the site runs.
- An add-on whose parent plugin was deactivated, as in the example above.
- Two plugins declaring the same function.
- A memory limit reached during an import.
Prevention
Update on staging first. It takes ten minutes and turns an outage into a non-event.
