Are you seeing an error message “There has been a critical error on this website” on your WordPress website? There could be several reasons behind this error message.
In this blog post, I share a few ways to identify and troubleshoot the error “There has been a critical error on this website.”
Let’s dive in!
1. Understand the Critical Error
WordPress’ critical error usually happens due to plugin or theme conflicts, PHP errors, or corrupted files.
When this occurs, WordPress sends an email with a link to the recovery mode, which allows you to access your dashboard temporarily.
2. Check Your Email for Recovery Mode Link
WordPress often sends an email with the subject line: “Your Site is Experiencing a Technical Issue.”
This email provides a recovery mode link. Click it to access your dashboard in safe mode, where you can troubleshoot without breaking your site further.
3. Deactivate All Plugins
Plugins are often the root cause of the critical error. Go to Plugins in the dashboard and deactivate all of them.
Reactivate them one by one to identify which plugin is causing the issue.
Once identified, delete, update, or find an alternative to the problematic plugin.
4. Switch to a Default Theme
Themes can also cause conflicts.
Here’s how to check.
- Go to Appearance > Themes and activate a default WordPress theme (like Twenty Twenty-One).
If this resolves the issue, the theme is the problem. Update it or contact your web developer/theme developer for support.
5. Increase PHP Memory Limit
Low memory limits in PHP can lead to a critical error, especially with plugins that require more resources.
- Access the wp-config.php file via FTP or File Manager in your hosting account.
- Add the following line to increase memory: define(‘WP_MEMORY_LIMIT’, ‘256M’);
- Save and refresh your site to check if the error is resolved.
6. Update WordPress Core Files
Outdated WordPress core files can sometimes trigger the critical error.
- Go to Dashboard > Updates and update WordPress to the latest version.
- Ensure your plugins and themes are also up to date to avoid compatibility issues.
7. Check for Corrupted Files
Corrupted files, especially in core WordPress files, can cause critical errors.
- Use FTP to access your site files, download a fresh copy of WordPress from WordPress.org, and upload the wp-admin and wp-includes folders to replace the corrupted files.
- Do not overwrite the wp-content folder, as it contains your themes, plugins, and uploads.
8. Enable Debug Mode
Enabling debug mode helps you identify specific errors causing the issue.
- In your wp-config.php file, locate define(‘WP_DEBUG’, false); and change it to define(‘WP_DEBUG’, true);.
- Refresh your site to view the error log and identify the cause, then disable debug mode by setting it back to false.
9. Contact Your Web Developer
If none of the above steps work, your WordPress developer may help.
Contact them to investigate issues, error logs, or database errors that might be causing the problem.
Conclusion
The critical error in WordPress can often be fixed through careful troubleshooting. Following these steps can help you regain control of your site without losing data or functionality.
Note: Please take a complete backup of your WordPress website before trying any of the above-mentioned suggestions.