If you’re managing a WordPress site, you might have stumbled across the dreaded message:
“There has been a critical error on your website.”
Don’t panic — this is one of the most common errors in WordPress, and the good news is: it’s fixable. Whether you’re a beginner or a developer, this guide will walk you through step-by-step how to troubleshoot and solve it.
What Causes This Error?
The “critical error” message is WordPress’s way of saying:
“Something broke — and it’s serious.”
Common causes include:
- Faulty plugins or themes
- PHP errors or memory limit issues
- Outdated WordPress core files
- Incompatible updates
- Server-side misconfigurations
Step-by-Step Guide to Fix It
1. Enable WordPress Debug Mode
First, let’s uncover the real issue behind the error.
- Access your site’s files using FTP or your hosting file manager
- Open the wp-config.php file
- Add or modify this line:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
Now visit the site again and check the error log file at:
/wp-content/debug.log
→ This log will give you a clue about which file or plugin is breaking your site.
2. Check and Deactivate Faulty Plugins
- Navigate to /wp-content/plugins/ via FTP
- Rename the plugins folder to something like plugins-old
→ This will deactivate all plugins
If the site loads now, it confirms that a plugin is the culprit.
Now:
- Rename plugins-old back to plugins
- Then rename each plugin folder one-by-one to find the faulty one
3. Switch to a Default Theme
Sometimes your active theme may be the issue.
To test:
- Navigate to /wp-content/themes/
- Rename your active theme’s folder
- WordPress will auto-switch to a default theme (like Twenty Twenty-Four)
If the site works again — you’ve found your issue.
4. Increase PHP Memory Limit
If your error log shows a memory exhausted message, you need to boost PHP memory.
In wp-config.php, add:
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
Still not working? Ask your host to increase it from the server side.
5. Check for Corrupted Core Files
If none of the above worked, try reinstalling core WordPress files:
- Download the latest WordPress package from wordpress.org
- Extract and upload only the wp-admin and wp-includes folders via FTP
(Do not overwrite wp-content or wp-config.php)
This refreshes corrupted core files without affecting your content.
6. Check PHP Version Compatibility
Ensure your server runs PHP 8.1 or higher — outdated versions may break modern plugins/themes.
Contact your hosting support or update it via cPanel.
Bonus Tip: Enable Recovery Mode
In newer WordPress versions, the system may send an email to the site admin with a recovery mode link.
Click that to log in even if the front end is down — and start debugging directly from the dashboard.
Final Thoughts
The “critical error” message looks scary — but it’s just WordPress protecting your site from crashing further. With the steps above, you can identify the problem quickly and bring your site back online without losing data or sleep.