Skip to content

How to Fix WordPress Critical Error

WordPress critical errors can shut down your site without warning, but they’re often fixable with the right steps. This guide walks you through safe, proven methods to diagnose and resolve the issue—even if you’re not a developer.

Key Takeaways

  • Enable debugging mode to reveal the exact cause of the error in your site’s code or plugins.
  • Deactivate all plugins via FTP or file manager to rule out plugin conflicts as the source.
  • Switch to a default theme like Twenty Twenty-Four to check if your current theme is causing the crash.
  • Check .htaccess and wp-config.php files for corruption or misconfigurations that may trigger fatal errors.
  • Restore from a recent backup if manual fixes fail—always keep backups before making changes.
  • Update PHP version carefully, as outdated or incompatible versions often cause critical errors.
  • Contact your hosting provider if the issue persists—they can check server logs and resource limits.

What Is a WordPress Critical Error?

A WordPress critical error—also known as the “White Screen of Death” (WSOD)—is a fatal PHP error that stops your website from loading properly. Instead of seeing your homepage or admin dashboard, you’ll likely see a blank white screen, an error message like “There has been a critical error on this website,” or even just a 500 Internal Server Error.

These errors usually happen after updating a plugin, theme, or WordPress core—but they can also stem from server issues, corrupted files, or incompatible code. The good news? Most critical errors are reversible if you act calmly and methodically.

In this guide, you’ll learn exactly how to fix WordPress critical error using safe, beginner-friendly techniques—no coding expertise required.

Step 1: Enable WordPress Debugging Mode

The first step in diagnosing any critical error is turning on WordPress’s built-in debugging feature. This reveals hidden error messages that explain what went wrong.

How to Fix WordPress Critical Error

Visual guide about How to Fix WordPress Critical Error

Image source: seekahost.com

How to Enable Debug Mode

  1. Access your website files via FTP (like FileZilla) or your hosting provider’s File Manager (e.g., cPanel).
  2. Locate the wp-config.php file in your site’s root directory.
  3. Open it in a text editor and look for this line:
    define('WP_DEBUG', false);
  4. Change it to:
    define('WP_DEBUG', true);
  5. Save the file and reload your website.

Now, instead of a blank screen, you should see a detailed error message—something like “Fatal error: Cannot redeclare function_name()” or “Allowed memory size exhausted.” Write down this message—it’s your roadmap to the fix.

Pro tip: Once fixed, remember to set WP_DEBUG back to false for security and performance.

Step 2: Deactivate All Plugins

Plugins are the most common cause of WordPress critical errors—especially after updates or new installations. If one plugin conflicts with another or contains buggy code, it can crash your entire site.

How to Fix WordPress Critical Error

Visual guide about How to Fix WordPress Critical Error

Image source: geekcodelab.com

Deactivating Plugins via FTP

  1. Connect to your site via FTP or File Manager.
  2. Navigate to /wp-content/plugins/.
  3. Rename the plugins folder to something like plugins_old.

This effectively deactivates all plugins at once. Now try accessing your site. If it loads, the problem was plugin-related.

Reactivate Plugins One by One

  1. Rename the folder back to plugins.
  2. Go into the folder and rename each plugin folder individually (e.g., change woocommerce to woocommerce_off).
  3. After renaming one, check your site. If it works, that plugin wasn’t the culprit.
  4. Continue until you find the problematic plugin—then either update it, replace it, or contact its developer.

If your site still doesn’t load after deactivating all plugins, move to the next step.

Step 3: Switch to a Default WordPress Theme

Your active theme might be causing the critical error—especially if you recently updated it or installed a poorly coded custom theme.

How to Change Your Theme Without Admin Access

  1. Go to /wp-content/themes/ via FTP or File Manager.
  2. Find your current theme folder (e.g., my-custom-theme) and rename it (e.g., my-custom-theme_off).
  3. WordPress will automatically fall back to a default theme like Twenty Twenty-Four, Twenty Twenty-Three, or Twenty Twenty-Two—if available.

Now reload your site. If it loads, your original theme was the issue. You can either:

If no default themes are installed, you may need to manually upload one—like Twenty Twenty-Four—via FTP.

Step 4: Check and Repair Core Files

Sometimes, WordPress core files get corrupted during updates or due to server glitches. This can trigger critical errors even if plugins and themes are fine.

Reinstall WordPress Manually (Without Losing Content)

  1. Download the latest version of WordPress from wordpress.org/download.
  2. Extract the ZIP file on your computer.
  3. Upload all files except the wp-content folder and wp-config.php to your server via FTP, overwriting existing files.

This refreshes core files while preserving your themes, plugins, uploads, and settings. After uploading, clear your browser cache and reload your site.

Note: Never overwrite wp-content or wp-config.php—these contain your site’s unique data!

Step 5: Fix Corrupted .htaccess File

The .htaccess file controls URL rewriting and server rules. If it’s corrupted or misconfigured, it can cause a 500 error or critical failure.

Reset Your .htaccess File

  1. Locate .htaccess in your site’s root directory.
  2. Rename it to .htaccess_backup.
  3. Create a new blank file named .htaccess.
  4. Paste the default WordPress rules into it:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    
  5. Save and upload the file.

Reload your site. If it works, the old .htaccess was the problem. You can compare it with the backup to see what changed.

Step 6: Increase PHP Memory Limit

WordPress may run out of memory during heavy operations (like importing content or running complex plugins), triggering a critical error.

How to Raise the Memory Limit

Add this line to your wp-config.php file, just above the “That’s all, stop editing!” comment:

define('WP_MEMORY_LIMIT', '256M');

If that doesn’t work, try adding this to your .htaccess file:

php_value memory_limit 256M

Or contact your host to increase the limit in php.ini. Most shared hosts cap memory at 128M–256M, but VPS/dedicated servers allow higher limits.

Step 7: Restore from Backup (Last Resort)

If none of the above steps work, restoring from a recent backup is your safest option. Always keep regular backups—many hosts offer automatic daily backups.

Use your hosting control panel (e.g., cPanel, Plesk) or a backup plugin like UpdraftPlus to restore your site to a working state before the error occurred.

After restoration, avoid making the same changes (e.g., updating that problematic plugin) until you’ve tested them in a staging environment.

Troubleshooting Tips

  • Check your PHP version: WordPress recommends PHP 8.0–8.2. Older versions (like PHP 7.4 or below) may cause compatibility issues. Update via your host’s dashboard—but test first!
  • Look at server error logs: Your hosting provider can show you recent error logs, which often pinpoint the exact file and line causing the crash.
  • Disable maintenance mode: If a plugin or update left your site in maintenance mode, delete the .maintenance file from the root directory.
  • Use WP Reset plugin cautiously: While tools like WP Reset can help clean up your database, they can also erase content—use only if you have a backup.

Conclusion

Encountering a WordPress critical error is stressful—but rarely permanent. By following these steps in order—debugging, disabling plugins, switching themes, checking core files, and restoring backups—you’ll recover your site safely and efficiently.

Remember: prevention beats cure. Always back up before updates, test changes on a staging site, and keep plugins/themes updated. With these habits, you’ll minimize future critical errors and keep your WordPress site running smoothly.