How to Fix the Critical Error on Your WordPress Website (2026 Guide)

How to Fix the Critical Error on Your WordPress Website (2026 Guide)

What Causes the WordPress Critical Error

The message “There has been a critical error on this website” is WordPress’s generic way of saying a PHP script has failed. It rarely tells you *which* file broke, so you have to isolate the cause. The most common triggers are:

  • A recently updated pluginthat conflicts with your theme or PHP version
  • A theme functionusing a deprecated PHP function
  • Memory limitexhaustion during plugin execution
  • A corrupted .htaccessfile
  • An incomplete WordPress core update

How to Fix Critical Error in WordPress Step by Step

Step 1: Check Your Email for the Real Error

WordPress usually emails the site administrator the exact PHP error and file path the moment the critical error occurs. Check your inbox (including spam) for a message from your site with the subject line mentioning a “fatal error.”

Step 2: Enable Debug Mode to See the Exact Error

Connect via FTP or your host’s File Manager and open ‘wp-config.php’. Replace:

  • ‘define( ‘WP_DEBUG’, false );’

with:

  • ‘define( ‘WP_DEBUG’, true );’
  • ‘define( ‘WP_DEBUG_LOG’, true );’
  • ‘define( ‘WP_DEBUG_DISPLAY’, false );’

Reload your site, then check ‘/wp-content/debug.log’ for the exact file and line number causing the failure.

Step 3: Deactivate All Plugins via FTP

If you can’t access wp-admin, rename the ‘/wp-content/plugins’ folder to ‘plugins-old’. This deactivates every plugin at once. If the site loads again, rename the folder back and rename each plugin’s subfolder one at a time until you find the culprit.

Step 4: Switch to a Default Theme

Rename your active theme’s folder inside ‘/wp-content/themes/’ to force WordPress to fall back to a default theme like Twenty Twenty-Four. If the error disappears, your theme’s ‘functions.php’ is the problem.

Step 5: Increase the PHP Memory Limit

Add this line to ‘wp-config.php’ just above the line that says “That’s all, stop editing!”:

  • ‘define( ‘WP_MEMORY_LIMIT’, ‘256M’ );’

Step 6: Restore a Recent Backup

If none of the above works, restoring a backup from before the error appeared is the safest and fastest fix — most managed hosts (SiteGround, Kinsta, WP Engine) keep automatic daily backups you can roll back with one click.

Step 7: Contact Your Hosting Support

If you’re not comfortable editing files, your host’s support team can usually check the raw PHP error logs and fix this for you within minutes.

Quick Reference: Cause vs Fix

Likely Cause How to Confirm Fix
Faulty plugin Error disappears after renaming /plugins folder Deactivate & update the conflicting plugin
Faulty theme Error disappears after switching to default theme Update or replace the theme
Low memory limit debug.log shows “Allowed memory size exhausted” Increase WP_MEMORY_LIMIT to 256M
Corrupted .htaccess Error clears after regenerating permalinks Regenerate .htaccess from Settings > Permalinks
Incomplete core update wp-admin shows update notice stuck Re-upload WordPress core files via FTP

 

Quick Checklist Before You Start

  • Take a full backup before making any changes
  • Always test one change at a time so you know exactly what fixed it
  • Keep your PHP version updated to at least 8.1 for better compatibility
  • Set up uptime monitoring so you catch critical errors before visitors do

Helpful Resources & Authority Links