Short answer: Temporarily rename wp-content/plugins folder to disable all plugins, set WP_DEBUG to true in wp-config.php, and inspect error_log to identify the conflicting line of code.
Diagnose and resolve fatal PHP crashes, blank white screens, and 'There has been a critical error on this website' alerts in WordPress.
Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup
Quick reference
| Diagnostic Mode | define('WP_DEBUG', true); in wp-config.php |
|---|---|
| Log File Location | public_html/wp-content/debug.log OR public_html/error_log |
| 1-Click Tool | cPanel > WordPress Toolkit > Disable suspect plugins |
Quick diagnosis
| Scenario & Suspected Cause | Immediate Action & Remedy |
|---|---|
| PHP errors suppressed by WordPress default config | Set define('WP_DEBUG', true); in wp-config.php to display exact fatal errors on screen. |
| Fatal conflict introduced by newly installed plugin | Rename specific plugin subfolder under wp-content/plugins to disable it immediately. |
| Syntax syntax crash in active theme functions.php | Rename active theme folder under wp-content/themes to force fallback to standard theme. |
| WordPress runtime memory exhausted | Add define('WP_MEMORY_LIMIT', '256M'); directly into wp-config.php above the stop editing line. |
Steps
- Inspect the Error Log: Open cPanel File Manager and check
public_html/error_log. The latest entry will identify the exact file and line number causing the fatal crash (e.g.Fatal error in /wp-content/plugins/xyz/plugin.php on line 42). - Disable Problematic Plugin in WP Toolkit:
- Go to WordPress Toolkit in cPanel > click your site > open the Plugins tab.
- Toggle OFF the plugin identified in the error log. Your site will instantly come back online.
- Alternative - Enable WP_DEBUG:
- Edit
wp-config.phpin File Manager and set:define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); - Errors will now log cleanly to
wp-content/debug.logwithout exposing raw errors to public visitors.
- Edit
Troubleshooting and tips
- Theme Crash: If the active theme triggered the WSOD, switch to a default theme like Twenty Twenty-Four from inside WP Toolkit.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket