Tuesday, August 5, 2025

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


 







if you see the message:

“There has been a critical error on this website”

It usually means WordPress encountered a fatal PHP issue due to a plugin, theme, or other conflict. Don’t worry — this can be fixed without much technical knowledge.


✅ Step-by-Step Troubleshooting Guide


🔹 Step 1: Enable Debug Mode

  1. Access your website files using cPanel File Manager or FTP.

  2. Open the file named wp-config.php.

  3. Add this line before “That’s all, stop editing!”:

    sql
    define( 'WP_DEBUG', true );
  4. Save the file.

This will help you see the actual cause of the error on screen.


🔹 Step 2: Deactivate All Plugins

If you can’t access the WordPress admin area:

  1. Go to wp-content folder.

  2. Rename the plugins folder to plugins-disabled.

  3. Refresh your website.

If the site loads, the issue is caused by one of the plugins. Rename it back to plugins, then deactivate plugins one by one to find the faulty one.


🔹 Step 3: Switch to a Default Theme

Sometimes the theme is the cause.

  1. Access your database via phpMyAdmin (from hosting panel).

  2. Find the wp_options table.

  3. Locate rows with template and stylesheet.

  4. Change their values to a default theme like twentytwentyfour.


🔹 Step 4: Check PHP Version Compatibility

  1. Login to your cPanel or Hosting Dashboard.

  2. Go to “Select PHP Version” or “PHP Settings.”

  3. Make sure you're using PHP 8.0 or later.

Older or unsupported PHP versions can cause critical errors.


🔹 Step 5: Restore from Backup (if needed)

If none of the above works:

  • Restore your website from a backup using your hosting service or a plugin like UpdraftPlus or JetBackup.


💡 Bonus Tip: Use WordPress Recovery Mode Link

When a critical error occurs, WordPress often sends an email with a recovery link to the admin email address. Use that link to log in and fix the issue in safe mode.


📌 Conclusion

The “critical error” in WordPress may look scary, but it’s fixable using the steps above. Always:

  • Keep a backup of your site

  • Update plugins/themes carefully

  • Ensure PHP version compatibility

Fixing these quickly will ensure your site gets back online without losing visitors.