So, you landed on your WordPress website, and instead of seeing your beautiful homepage, you encountered an alarming white screen with the message:
“There has been a critical error on this website.”
While this can be panic-inducing, don’t worry—this is a common issue WordPress users face. The good news? It’s fixable, often within minutes. In this guide, we’ll take you through a quick, efficient troubleshooting process to get your site back up and running as fast as possible.
What Does the “Critical Error” Message Mean?
This error typically occurs when something goes wrong within the PHP code of your WordPress backend. It could be a plugin conflict, theme issue, memory limit exhaustion, or file corruption. Until recently, WordPress displayed a generic white screen of death (WSOD), but newer versions now show this slightly more helpful “critical error” message.
This screen may also mention that an email has been sent to your WordPress admin email with more details, including recovery mode access. Use that link if available. If not, follow this guide to diagnose and fix the problem manually.
Step-by-Step Guide to Fix the Critical Error
1. Enable Debugging in WordPress
First, we need to look under the hood. WordPress’ built-in debugging feature can provide more specific information about that critical error.
- Access your website files using an FTP client or File Manager in your web hosting control panel.
- Open the wp-config.php file located in your site’s root directory.
- Find the line that says
define('WP_DEBUG', false);and change it to:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
This will log error messages to a debug log you can find at wp-content/debug.log. Check that file after refreshing your website to identify the problem.
2. Deactivate All Plugins
Plugins are the number one cause of fatal errors. To test this:
- Rename the plugins folder found in /wp-content/ to something like plugins_old.
- Reload your site. If it now loads, a plugin is to blame.
- Rename the folder back to plugins and rename each individual plugin directory one at a time until the culprit is found.
Once you identify the problematic plugin, you can remove or update it through FTP or consult its documentation for support.
3. Switch to a Default Theme
If deactivating plugins didn’t solve the issue, your theme might be the offender. Try switching to a default WordPress theme like Twenty Twenty-Four:
- Go to your site’s /wp-content/themes/ directory.
- Rename your active theme’s folder (e.g., customtheme → customtheme_old).
- WordPress will fall back to a default theme automatically. If not, upload one manually through FTP.
If the site returns, your theme is likely the issue. Investigate its functions.php file or recent changes to fix bugs.
4. Check for PHP Version Compatibility
WordPress, plugins, and themes require a minimum PHP version to function correctly. If your hosting server runs an outdated PHP version, it could trigger fatal errors.
Check your current PHP version via your hosting control panel or contact your host. If you’re not on at least PHP 7.4 (preferably PHP 8.0 or higher), update it if your hosting provider allows.
5. Restore from Backup
If you recently made changes and started seeing the error, a backup is your safety net. Restore your website to the last stable version if available.
Hosting services like Bluehost, SiteGround, and Kinsta offer one-click restore functionalities. Check your hosting dashboard or backup plugin for restore options.
6. Increase PHP Memory Limit
Out-of-memory issues may also cause this critical error. To increase memory limit:
- Edit
wp-config.phpand add this line before/* That's all, stop editing! ... */:
define( 'WP_MEMORY_LIMIT', '256M' );
This tells WordPress to allocate more memory to execute its operations. Typically, 256MB is more than sufficient.
7. Check File Permissions
Incorrect file or folder permissions might prevent WordPress from executing code properly, leading to errors.
- Folders should be set to 755
- Files should be set to 644
You can change permissions via your FTP client or file manager. Right-click on the file/folder and choose ‘Permissions’ to make changes.
8. Reinstall WordPress Core Files
If everything else fails, your WordPress core files might be corrupted.
- Download the latest version of WordPress from wordpress.org.
- Extract the ZIP file, but delete the wp-content folder so your themes and plugins aren’t overwritten.
- Upload the remaining files over your existing WordPress installation via FTP.
This replaces corrupted core files without wiping your content.
Pro Tips to Avoid This Error in the Future
To minimize the risk of the “critical error” appearing again:
- Update regularly: Keep WordPress core, plugins, and themes updated to the latest versions.
- Use quality plugins: Stick to well-reviewed tools and avoid abandoned plugins.
- Perform backups: Automate daily or weekly backups using tools like UpdraftPlus or BlogVault.
- Enable a staging site: Test major changes on a staging environment before pushing to live.
- Monitor error logs: Regularly check your debug log or error_log file to catch minor issues before they escalate.
When to Contact Your Hosting Provider
If you’re stuck even after all the above steps, your hosting provider might be able to help. Here’s when you should reach out:
- You can’t access FTP or cPanel
- You can’t upgrade the PHP version yourself
- Server resource limits are being exceeded
- The error goes away and comes back randomly (e.g., server instability)
Provide them the debug log or the exact time the issue occurred to help with a quicker resolution.
Wrapping Up
While the “There has been a critical error on this website” message is intimidating, it’s rarely permanent. With a structured approach—starting from debugging and deactivating plugins, to checking themes and PHP compatibility—you’ll quickly isolate and fix the issue.
Remember: backups and preventive maintenance are your best defense. Don’t wait for errors to strike—proactively manage your WordPress site for the best long-term experience.
Now that you’ve got your site running again, maybe it’s time to install a security plugin or setup uptime monitoring. Your peace of mind is worth it!