WordPress Errors 11 min read

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

Advertisement

Google AdSense In-Article Display Placement

Publisher ID: ca-pub-XXXXXXXXXXXXXXXX (Configured in config.php)

The generic message "There has been a critical error on this website" indicates an unhandled fatal PHP error triggered by an incompatible plugin update, corrupted theme code, or PHP memory exhaustion.

✔ Rapid Direct Solution

Connect to your hosting File Manager or FTP, edit "wp-config.php", and set "define('WP_DEBUG', true);" and "define('WP_DEBUG_LOG', true);". Check "wp-content/debug.log" to see the exact plugin causing the fatal error. Then rename that specific plugin folder to deactivate it and restore site access.

1. Problem Diagnosis & Symptoms

WordPress fatal error recovery protection system intercepts fatal errors, halts rendering, and displays a user-friendly critical error notification.

2. Primary Root Causes

  • Cause: Plugin conflict caused by updating a plugin whose code requires a newer PHP version.
  • Cause: Exhausted PHP memory limit.

3. Step-by-Step Diagnostic Fixes

1

Enable WordPress Debugging Mode in wp-config.php

Add debug directives to wp-config.php right before the stop editing line.

PHP
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

4. How to Verify the Resolution

  • ✔ Inspect wp-content/debug.log to see the exact error.

5. Diagnostic Troubleshooting Matrix

Symptom Observed Root Cause Recommended Action
debug.log points to: wp-content/plugins/xyz Plugin syntax or compatibility error Rename wp-content/plugins/xyz to xyz_old to deactivate it

6. Critical Mistakes to Avoid

  • ❌ Never leave WP_DEBUG_DISPLAY enabled on a live public site.

7. Frequently Asked Questions

❓ Can I fix this error through phpMyAdmin database?

Yes, in the wp_options table, set active_plugins to a:0:{} to deactivate all plugins directly via SQL.

Official Technical References

Advertisement

Google AdSense In-Article Matched Content Unit