While running a WordPress site, coming across the message “There has been a critical error on this website” can be alarming, especially when it appears without warning. This error typically replaces your entire website with a plain white screen and a vague message offering little detail. Site owners and developers often associate this with the dreaded “white screen of death”, and while it’s frustrating, it’s usually fixable with a methodical approach.
This article explains what causes this error, how to fix it, and how to prevent it from happening again. Whether you’re a beginner or a seasoned developer, these steps will help you troubleshoot the problem and restore your website to normal functionality.
What Causes the Critical Error in WordPress?
The critical error usually indicates a fatal PHP error that stops your site from loading. Common culprits include:
- Incompatible or outdated plugins
- Themes with bugs or deprecated code
- Conflicts between plugins and themes
- Exceeded PHP memory limits
- Corrupted core WordPress files
When WordPress encounters such a problem, it halts execution and shows the error message. The site may also send an email to the admin address with a more detailed error description and a link to access “Recovery Mode.”
Steps to Fix the Critical Error
1. Enable WordPress Debugging Mode
Before diving into deeper troubleshooting, turn on WordPress debug mode to get more detailed error information. To do this:
- Connect to your site using FTP or your hosting file manager.
- Locate the wp-config.php file in the root directory.
- Add or edit the following lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
These settings will log detailed error messages to a debug.log file located in wp-content. Check that file to see which file or plugin is causing the issue.
2. Deactivate All Plugins
Plugins are the most common reason behind critical errors. To determine if a plugin is the cause:
- Access your site via FTP or cPanel.
- Navigate to wp-content.
- Rename the plugins folder to plugins_old.
This will deactivate all active plugins. Check your website again. If it loads properly, a plugin is the source of the problem. You can then:
- Rename the plugin folder back to plugins.
- Reactivate plugins one by one from the dashboard until you find the culprit.

3. Switch to a Default Theme
If it’s not the plugins, a theme problem could be causing the error. To test this:
- Go to wp-content/themes.
- Rename your active theme’s folder, forcing WordPress to revert to a default theme like Twenty Twenty-Four.
If you don’t have a default theme installed, download one from wordpress.org/themes and upload it to your theme folder manually. If the error disappears, the problem lies in your previous theme.
4. Check PHP Version Compatibility
WordPress and many of its plugins require a minimum PHP version to function correctly. If you’re running an outdated version, update it to at least PHP 7.4 or preferably PHP 8.0+ via your hosting control panel or with assistance from your host’s support team.
Always verify that your plugins and themes are compatible with your PHP version before upgrading.
5. Increase PHP Memory Limit
Sometimes the error stems from memory exhaustion. To increase it:
- Open your wp-config.php file.
- Add the following line before
/* That's all, stop editing! */
:
define( 'WP_MEMORY_LIMIT', '256M' );
You can also request this change directly from your hosting provider if the above method doesn’t work.
6. Restore from a Backup
If you have regular backups enabled through a plugin or your hosting company, restoring from the most recent working backup can be a quick way to recover from the critical error.

7. Use Recovery Mode
WordPress 5.2 and above comes with an inbuilt “Recovery Mode.” If your site crashes, WordPress may send a link to the admin email that allows logging into the dashboard with recovery mode enabled.
Recovery mode loads the backend without triggering the plugin or theme causing the error. Once logged in, deactivate the offending plugin or theme to restore the site’s functionality.
Prevent Future Occurrences
Once the issue is fixed, taking preventive measures is key:
- Regular Updates: Always keep your WordPress core, themes, and plugins up-to-date.
- Staging Site: Test changes on a staging site before pushing them live.
- Backups: Automate daily backups using a plugin or through your hosting provider.
- Theme/Plugin Quality: Use well-coded and maintained products from trusted sources.
Conclusion
While the “There Has Been a Critical Error on This Website” message can feel catastrophic, it’s rarely unfixable. By methodically checking plugins, themes, PHP settings, and logs, most WordPress site administrators can get their site back up and running with minimal downtime. Stay proactive with monitoring, updates, and backups to avoid repeating these issues in the future.
Frequently Asked Questions (FAQ)
- Q1: What should I do if I don’t have access to the admin dashboard?
- Use FTP or your hosting’s file manager to manually deactivate plugins or switch themes to regain access.
- Q2: How do I know which plugin caused the error?
- Once plugins are deactivated and your site works again, reactivate them individually and check your site after each activation to identify the culprit.
- Q3: How can I access the debug log?
- The debug log is usually located at wp-content/debug.log. You must enable debugging in the wp-config.php file to generate this log.
- Q4: Will reinstalling WordPress fix the error?
- In some cases, yes. If core files are corrupted, reinstalling WordPress might resolve the error. Make sure to back up your database and content first.
- Q5: Is this error harmful to my site’s ranking?
- If the error persists for an extended time, it may affect SEO and visitor trust. Aim to resolve it as quickly as possible to avoid negative impacts.
- Q6: Can I prevent this error entirely?
- While it’s hard to guarantee prevention, maintaining good site hygiene—regular updates, backups, and testing—can significantly reduce the risk.