+254725682556 +254725052660 info@ziprof.co.ke
Client Area

WordPress

How to Fix "There Has Been a Critical Error on This Website" in WordPress

The message "There has been a critical error on this website" is WordPress's way of catching a fatal PHP error before it shows a blank white screen to your visitors. It does not tell you what went wrong, only that something did. In most cases the cause is a plugin or theme that has stopped working, often right after an update.

What Causes This Error

The most common causes are:

  • A plugin or theme update that is incompatible with your PHP version or with another plugin.
  • A plugin that was updated but did not finish installing correctly.
  • Your site running out of available PHP memory.
  • A corrupted core file from an interrupted WordPress update.

Step 1: Check Your Email for a Recovery Link

When this error happens, WordPress usually sends an email to the site administrator's address with a special "recovery mode" link. Opening that link lets you log in to wp-admin in a safe mode where the broken plugin or theme is paused, so you can go straight to disabling it without touching any files. Check your inbox (and spam folder) for an email from your site before trying anything else.

Step 2: Check Your Site's Error Log

If there is no recovery email, the fastest way to identify the exact cause is to look at the PHP error log for your site, which records the specific fatal error and which file triggered it. You can find this log through your hosting control panel's File Manager, usually in your account's root or in a file called error_log inside your site's folder.

If you have developer access, you can also add define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); to your site's wp-config.php file to write detailed errors to wp-content/debug.log. Remove these lines again once you are done, since leaving debug mode on can expose error details to visitors.

Step 3: Deactivate Plugins to Find the Culprit

If you cannot log in to wp-admin at all, you can deactivate every plugin at once through your hosting control panel's File Manager. This step works the same way whether your account is on cPanel or DirectAdmin.

  1. Open File Manager and browse to public_html/wp-content (adjust the path if WordPress is installed in a subfolder).
  2. Find the plugins folder and rename it to something like plugins-disabled.
  3. Try loading your website again. If it loads normally, WordPress will show all your plugins as deactivated once you rename the folder back and log in.
  4. Rename the folder back to plugins, then log in to wp-admin and reactivate your plugins one at a time, checking the site after each one, until you find the one that breaks it.

Once you find the problem plugin, look for an updated version, or remove it and find an alternative if it is no longer maintained.

Step 4: Switch to a Default Theme

If the error persists after ruling out plugins, the theme may be the cause. In File Manager, go to wp-content/themes and rename your active theme's folder. WordPress will automatically fall back to a default theme (such as Twenty Twenty-Four) if one is installed, which lets you confirm whether the theme was the source of the fatal error.

Step 5: Check Your PHP Version and Memory Limit

Plugins and themes are sometimes built for a specific range of PHP versions. If yours was recently changed, or a plugin was updated to require a newer version than your site is running, that mismatch can trigger this error. You can check and change your site's PHP version from your hosting control panel.

Running out of available memory during a page request causes the same generic error message. Increasing your site's PHP memory limit is a quick, safe step to rule this out.

If Nothing Works: Restore From a Backup

If you cannot isolate the cause, or if a recent update has corrupted core files, restoring your site from a recent backup is the most reliable fix. Always take a fresh backup before making further changes, even if the site is currently broken, so you do not lose any content added since the last automatic backup.

For more on adjusting PHP settings, see how to increase PHP upload and memory limits and how to check and change your website's PHP version.