
If your WordPress website suddenly displays ‘There has been a critical error on this website’, WordPress has encountered a fatal PHP error that prevents part or all of the site from loading normally. The problem is often caused by a plugin, theme, PHP compatibility issue, failed update, exhausted memory limit, or custom code error.
The good news is that many WordPress critical errors can be diagnosed systematically without rebuilding the website. This guide explains the safest troubleshooting steps and when it makes sense to get professional help.
What causes the WordPress critical error?
WordPress normally shows the critical-error message when PHP cannot continue executing a request. Common causes include:
- A plugin update introducing a fatal PHP error
- A theme or child-theme compatibility problem
- An outdated PHP version or a plugin that is incompatible with the current PHP version
- A failed WordPress core, plugin, or theme update
- Insufficient PHP memory
- Broken custom code in functions.php or a custom plugin
- Corrupted WordPress files
- A database-related failure that triggers a PHP exception
If the site shows a 500 Internal Server Error instead, see our separate guide on fixing a WordPress 500 error.
1. Check the WordPress recovery-mode email
When WordPress detects certain fatal errors, it may send an email to the site administrator. The message usually identifies the plugin, theme, or file involved and may contain a special recovery-mode login link.
Check the administrator email account and spam folder for a message from WordPress. If the email identifies a specific plugin or theme, that gives you a strong starting point. Do not delete the entire website or reinstall WordPress simply because one component failed.
2. Disable the suspected plugin
If you can still access wp-admin, go to Plugins and deactivate the plugin mentioned in the recovery email or the plugin that was most recently installed or updated.
If you cannot access the dashboard, you can usually disable a plugin through your hosting file manager or FTP by renaming its folder inside wp-content/plugins/. For example, renaming example-plugin to example-plugin-disabled prevents WordPress from loading it.
Reload the website after making one change at a time. If the site returns, you have narrowed the failure to that plugin or its interaction with another component.
3. Test whether the active theme is causing the problem
A theme can trigger a critical error after an update, PHP change, or custom-code edit. If plugin troubleshooting does not resolve the issue, test the active theme.
If you can access WordPress, temporarily switch to a standard default theme. If the dashboard is unavailable, theme troubleshooting should be done carefully through the file system or database because forcing the wrong theme can create additional layout problems.
If switching themes restores the site, inspect recent changes to the theme, child theme, functions.php, or theme-specific integrations before reactivating it.
4. Check the PHP version
WordPress itself may support your server’s PHP version while an older plugin or theme does not. The reverse can also happen: an outdated PHP version may no longer meet the requirements of newer software.
Check the PHP version in your hosting control panel and compare it with the requirements of WordPress and the affected plugins. Do not randomly switch production PHP versions without a backup. A PHP change can resolve one compatibility issue while exposing another.
5. Increase the WordPress memory limit carefully
Some critical errors occur because PHP runs out of memory while loading WordPress. Error logs may contain wording such as Allowed memory size exhausted.
Increasing the WordPress or PHP memory limit can help when legitimate processes require more memory, but it should not be used to hide a badly behaving plugin. If memory usage suddenly increased after an update or installation, identify the underlying cause as well.
6. Enable WordPress debugging and read the error log
One of the fastest ways to diagnose a critical error is to obtain the actual PHP error rather than guessing.
WordPress debugging can write errors to wp-content/debug.log when correctly configured. Hosting platforms may also provide PHP error logs in cPanel, Plesk, or a server dashboard.
Look for the most recent Fatal error, Uncaught Error, or similar message. The file path usually points toward the plugin, theme, or custom code responsible.
Do not leave public error display enabled on a live website after troubleshooting because error messages can reveal sensitive server paths and technical details.
7. Replace corrupted WordPress core files
If no plugin or theme is responsible, WordPress core files may have been damaged during an incomplete update or file transfer. Core files can be replaced with clean copies from the matching WordPress release while preserving wp-content and the site’s configuration.
This step should be performed carefully and with a backup. Never overwrite wp-content when the goal is simply to refresh WordPress core files.
8. Undo the most recent code change
If the error appeared immediately after editing PHP, adding a code snippet, changing functions.php, installing a custom plugin, or modifying a template, revert that specific change first.
A missing semicolon, incorrect function call, duplicate function name, or code written for a different PHP version can take down the site instantly.
What if wp-admin is also inaccessible?
When both the front end and WordPress dashboard are unavailable, troubleshooting usually moves to the hosting layer. You may need access to:
- cPanel, Plesk, or your host’s file manager
- FTP/SFTP
- PHP error logs
- phpMyAdmin for controlled database checks
- A recent working backup
Avoid making several changes at once. The safest process is to record the current state, make one controlled change, test, and then continue based on the result.
Can a WordPress critical error be fixed without losing content?
Yes, in many cases. A plugin conflict, PHP error, failed update, or theme problem usually does not mean your posts, pages, products, or customer data are gone. The priority is to identify the component causing WordPress to fail and restore normal execution without unnecessarily replacing the database or website.
When should you get professional help?
Get help when the website is business-critical, the error affects WooCommerce checkout or customer access, you do not have a reliable backup, the dashboard is inaccessible, the error returns after temporary fixes, or you are unsure which server or database change is safe.
DevTechi provides a WordPress Emergency Fix service starting from $39 for focused WordPress problems including critical errors, failed updates, plugin conflicts, Elementor issues, PHP errors and related failures.
If you are not sure what is wrong with the website, request our Free 5-Point Website Health Check. We review performance, mobile usability, WordPress health, SEO basics and conversion issues and highlight what should be addressed first.
Frequently asked questions
Why did the critical error appear after an update?
An update can expose incompatibilities between WordPress, PHP, a plugin, or the active theme. The update itself is not always defective; sometimes two components simply stop being compatible after one changes.
Will reinstalling WordPress fix the critical error?
Not necessarily. Reinstalling core files can help if WordPress files are corrupted, but it will not solve a fatal error caused by a plugin, theme, server setting, or custom code.
Should I restore a backup immediately?
A recent clean backup can be useful, especially after a failed update, but first understand what changed. Restoring an old backup can overwrite new orders, form submissions, content, or other data created after the backup.
How much does it cost to fix a WordPress critical error?
The cost depends on the cause and scope. DevTechi’s focused WordPress Emergency Fix starts from $39 for one straightforward issue. Larger problems, multiple unrelated failures, malware cleanup, migrations, or custom development are quoted separately.