Few WordPress problems are as frustrating as the dreaded message: "There has been a critical error on this website." You want to know how to resolve this error as quickly as possible and restore your website — but the critical error message provides little insight into what, exactly, has gone wrong or how it can be resolved.
Fail to promptly and effectively deal with the problems referenced by Google, and you could run into a whole host of issues. Website visitors will quickly be disenchanted as they are unable to access your site and your products or services. This could quickly result in dramatic losses in profits, not to mention long-term damage to your reputation and SEO.
Much of the frustration attributed to the WordPress critical error message stems from its lack of details.
These errors typically involve obstacles to PHP code execution. Perhaps there is an unresolved error with the WordPress theme or plugins — or maybe you've surpassed your wp_memory_limit. Either way, you'll need to address the problem swiftly, or you risk suffering these issues:
It can be difficult to discern what, exactly, is at the crux of any given critical error on WordPress, as the message itself tells you very little. Potential concerns worth looking into include:
You've encountered the dreaded "critical error" message and need to act fast. How you proceed may determine how quickly your site returns to full functionality — and whether you're able to limit the long-term damage. These troubleshooting essentials should help:
Often, WordPress error notifications include instructions to check your admin email inbox. There, you may find more details about the nature of the error or even its cause. Check for a URL to the recovery mode version of the site.
If you don't immediately see a related email in your inbox, visit the spam folder. Unfortunately, it's possible that you won't receive an email at all and may need to go about fixing the issue on your own.
The error_log file can be an invaluable resource in the event of a WordPress error message. This file records several types of PHP errors, including the aforementioned parse. Check whether your hosting provider can help you access the error_log file.
Otherwise, the next best option is to take advantage of the built-in debugging mode. Check the wp-config.php file for lines defining WP_DEBUG, WP_DEBUG_DISPLAY, and WP_DEBUG_LOG as false, but replace the false with true to activate debug mode.
Website backups are a must. If your site has recently been backed up, you can easily restore files to the most recent version to get your website running as quickly as possible. The specifics of this process will depend on your unique backup strategy, but the potential for critical errors alone should have you thinking strongly about upping your backup game.
Issues revealed in the WordPress core will force you to replace missing files. You can check for PHP errors by visiting your website and then checking the debug.log file in the /wp-content/ directory.
Be prepared to reinstall the relevant version of WordPress and replace specific files. You have the option to manually update specific core files or update the complete /wp-includes/ or /wp-admin/ directories within the WP installation folder.
If you no longer have access to your WordPress admin dashboard, you can reupload the core files using an FTP client. Download the core files from wordpress.org and upload them to your site while also excluding the wp-content folder.
Take a close look at theme and plugin folders to determine whether conflicts exist and how they can be resolved. Sometimes, all it takes to get back to the admin area is to deactivate the problematic plugin or even switch themes. Again, this is where an FTP client can come in handy. Default options such as twenty twenty or twenty twenty-one can be helpful for experimentation purposes.
If, while experimenting with disabling plugins or themes, you are suddenly able to access the WordPress admin area, chances are that a malfunctioning plugin or theme is to blame. You may need to reactivate these one at a time to determine which, exactly, is causing your critical error. A vulnerability scanner can provide quick insight and is worth implementing even when you aren't dealing with critical errors.
If you're plagued by insufficient memory, simply updating the default limits may help. While the typical limit of 128 MB is more than enough in most cases, exceptions certainly exist. If you've already reached the maximum, you may need to seek an upgrade for your hosting plan. Look to your web host for a better solution or consider seeking a different provider altogether.
Malware may be to blame for your critical error debacle, and, if so, none of the solutions highlighted above will bring you lasting relief. Malware scanning, however, can reveal where a line of code has been compromised. This will flag suspicious content and provide the insight needed to take additional action.
Scanning your WordPress site is an especially critical step if you've observed other signs of trouble, such as spam search results or warnings from Google Search Console. Implement a daily scanning solution to provide lasting peace of mind.
Following a successful troubleshooting initiative, you will want to enact a variety of preventative strategies that allow you to bypass critical errors in the future. At a minimum, implement these best practices:
When in doubt, don't hesitate to get a team of experts in on the action. Professionals have a knack for both spotting WordPress vulnerabilities and fixing them.
Make the most of WordPress opportunities without suffering technical issues: look to SiteLock for help. We provide the full range of WordPress site security services you need to keep your site running optimally.
Check out our plans to learn more about the various services and levels of support we provide. Feel free to get in touch to discuss your needs.
To learn more about WordPress security, see our additional resources: