How to Fix the WordPress Critical Error

Bug fix icon representing WordPress critical error troubleshooting

Few things stop you in your tracks quite like opening your WordPress site and being greeted by a plain white screen with the message “There has been a critical error on this website.” It’s alarming, particularly if you’re running an online business or relying on your site for lead generation. The good news is that this error is almost always fixable and in most cases it points to a specific, identifiable problem rather than some catastrophic failure. If you’d rather not troubleshoot alone, WordPress support services for business websites can step in and get your site back on its feet quickly.

WordPress 5.2 brought us the critical error message and honestly, it’s a massive improvement over the old white screen of death. Before this update you’d just stare at a blank page wondering what the hell went wrong. Now WordPress tells you there’s a code-level problem and usually fires off an email to the site admin with proper details about which plugin or theme caused the chaos. Check that email first because it often includes a recovery mode link that gets you back into your dashboard even when everything else is broken.

What Causes the WordPress Critical Error

Fatal PHP errors trigger the critical error when WordPress can’t load properly. Could be a syntax error in your theme files, maybe a function that doesn’t exist getting called or two plugins having a proper fight over the same bit of code.

Plugin conflicts top the list every time. Thousands of different developers write WordPress plugins and they don’t exactly coordinate with each other. One plugin update might clash with another or demand a PHP version your server doesn’t have. Theme problems run a close second, particularly when updates change template files that child themes were relying on.

Your hosting provider upgrades PHP and suddenly everything breaks because some plugin hasn’t caught up with the changes. Deprecated functions start throwing fatal errors left and right. Memory exhaustion hits when WordPress tries to process too much at once and runs out of allocated PHP memory. Corrupted core files are less common but they’ll definitely trigger the critical error if an update gets interrupted or someone accidentally modifies the wrong files.

Common Cause Typical Trigger Difficulty to Fix
Plugin conflict After updating or installing a plugin Low to moderate
Theme incompatibility After switching or updating a theme Low to moderate
PHP version mismatch After server PHP upgrade Moderate
Memory exhaustion On resource-heavy pages or during imports Low
Corrupted core files After failed update or file tampering Moderate to high

Think about what changed between yesterday and today if your site was working fine and suddenly broke. The critical error almost always appears immediately after a change. Maybe you updated a plugin, switched themes or edited a file. That context narrows down your investigation massively.

Enabling WordPress Debug Mode

Debug mode is your next move when the critical error appears without a helpful email from WordPress. WordPress will display detailed PHP error messages instead of that generic critical error screen, showing you exactly which file and line number caused the problem. You’ll need FTP, SFTP or your hosting provider’s file manager to access your site’s files.

Find the line that says define( 'WP_DEBUG', false ); when you open the wp-config.php file in your WordPress root directory. You’ll need to change it and add a couple of related constants. The WordPress debugging documentation covers everything in detail, but here’s what you need to configure.

// Enable WordPress debug mode
define( 'WP_DEBUG', true );

// Log errors to wp-content/debug.log instead of displaying on screen
define( 'WP_DEBUG_LOG', true );

// Hide errors from visitors (keep this true on live sites)
define( 'WP_DEBUG_DISPLAY', false );

// Log all PHP errors

@ini_set( ‘display_errors’, 0 ); WordPress will write detailed error messages to a file called debug.log inside your wp-content directory with these settings active. Download that file after refreshing your site and you’ll see the specific error causing your headaches. The error message shows you a file path pointing to the problem plugin or theme, plus a line number and description of what went wrong. Always keep WP_DEBUG_DISPLAY set to false on live sites so visitors don’t see raw PHP errors, which creates a terrible user experience and opens up security risks.

Step-by-Step Diagnostic Process

Warning icon representing diagnostic steps for WordPress errors

Debug logs pointing to specific plugin files make your job easy. Deactivate that plugin and your site should bounce back to life. But when the logs aren’t talking or you’re locked out completely, you need to get systematic about it.

Kill all your plugins first. Recovery mode still working? Hit the Plugins page and switch everything off. Can’t get into admin? FTP in and rename the wp-content/plugins folder to plugins-disabled or whatever. Site loads after that and you’ve found your culprit category. Rename it back to plugins and start switching them on one at a time until something breaks.

Plugins weren’t the problem? Your theme’s probably causing trouble. Rename your active theme folder via FTP and WordPress will drop back to Twenty Twenty-Four or whatever default it can find. If everything works with the default theme, you know where to look next.

Sometimes corrupted WordPress core files are messing things up when plugins and themes check out fine. Download fresh WordPress from wordpress.org and upload just the wp-admin and wp-includes folders over your existing ones. Your content and customisations in wp-content stay safe, but you get clean core files that might solve the whole mess.

Recovering Access Through FTP and File Manager

File-level access becomes your lifeline when the critical error blocks both your site’s front end and WordPress admin. Your hosting provider’s control panel gives you a file manager through cPanel, Plesk or their custom interface and this works perfectly for the troubleshooting steps we’ve covered. FTP clients like FileZilla offer the same access but with an interface you might find more comfortable. WordPress managed hosting providers usually throw in extra tools and support channels for recovery situations.

You’ll be working with wp-config.php in the root directory for debug settings and memory limits, wp-content/plugins/ for plugin deactivation, wp-content/themes/ for theme switching and wp-content/debug.log for error output. Check your hosting provider’s documentation if they use custom directory structures because some managed WordPress hosts stick the installation in a subdirectory instead of the web root.

While you’ve got file access, take a look at your .htaccess file. Server errors from a corrupted .htaccess can masquerade as WordPress critical errors. Rename it to .htaccess-backup and refresh your site. Site loads but permalinks are broken? Head to Settings > Permalinks in WordPress admin and click Save Changes to regenerate a fresh .htaccess file. The Apache documentation on.htaccess files explains what the file does if you’re curious.

PHP Memory and Server Configuration

Debug log showing “Fatal error: Allowed memory size exhausted”? The fix is straightforward and you need to bump up WordPress’s PHP memory limit. Open wp-config.php and add or modify this line above the “That’s all, stop editing!” comment:

define( 'WP_MEMORY_LIMIT', '256M' );

Your server gets 256 megabytes of memory when WordPress makes this request. WordPress defaults to 40MB for front-end and 256MB for admin work, but hosting providers often set their own limits that override these values. Memory limit increases won’t fix the error if you’ve got a plugin or process hogging unreasonable amounts of memory, which means you’re dealing with code rather than a simple configuration problem. Well-coded plugins and proper WordPress development setups prevent these memory issues from happening.

Check your PHP version because mismatches cause real headaches. WordPress wants PHP 8.1 or higher and each version drops old functions whilst adding new ones. Your hosting control panel shows which PHP version you’re running or check Tools > Site Health in WordPress. Plugin errors about deprecated functions need plugin updates, not PHP downgrades, because older PHP versions stop getting security patches. The PHP supported versions page tells you which versions still get security updates.

Preventing Critical Errors in the Future

You’ve solved the immediate crisis but that’s just half the battle. Updates for plugins, themes and WordPress core cut down compatibility problems, though sometimes updates create new issues. Testing updates on staging sites before pushing them live is the safest route. Most WordPress maintenance and security services provide staging environments and managed update processes for exactly this reason. And delete plugins you don’t use instead of just deactivating them because inactive plugins still create security risks and sometimes clash during updates.

“If you get a critical error, don’t panic. The recovery mode email that WordPress sends contains a direct link to your dashboard, bypassing the error on the front end.

Your inbox might hold the answer before you even touch FTP. The WordPress Site Health tool under Tools > Site Health catches problems early and flags outdated PHP versions, missing security headers and dormant plugins that could blow up later. Fewer plugins means fewer chances for conflicts. So check any new plugin’s update history, WordPress compatibility and support forums for conflict reports before installing. Well-maintained plugins follow the WordPress plugin guidelines.

When to Call a Professional

WordPress icon representing professional support services

Some critical errors won’t budge no matter what you try. Database corruption creates critical errors that need specialist tools to fix properly. Server misconfigurations do the same thing. And if malicious code gets injected into your theme files, you’re looking at fatal PHP errors plus a much bigger security nightmare underneath. A professional can fix the immediate problem and check if your site’s been compromised. Contact whoever built your web design first since they know your codebase and server setup.

Critical errors sound scary but they’re just PHP telling you exactly what broke. Start with the debug log, work through plugins and themes systematically and most errors get sorted within an hour. Don’t panic, don’t change things randomly and always keep a backup ready.

FAQs

What does the WordPress critical error message mean?

The “There has been a critical error on this website” message was introduced in WordPress 5.2 as part of the site health system. It indicates that a fatal PHP error has occurred that prevents WordPress from functioning. This is actually an improvement over older versions where your site would simply show a blank white screen with no explanation. WordPress attempts to send an email to your admin address with details about what broke and which plugin or theme caused the problem, often including a recovery mode link that lets you access your dashboard even when everything else is down.

How do I use WordPress recovery mode to fix a critical error?

When WordPress detects a critical error, it sends an email to the admin address registered on your site. This email typically contains a special recovery mode link that bypasses the error and lets you access your WordPress dashboard. Once logged in through recovery mode, you can deactivate the problematic plugin or switch to a default theme without needing FTP access. Check your email inbox and spam folder for this message. If you have not received the recovery email, you will need to troubleshoot manually using FTP to disable plugins or enable debug mode.

Can a PHP version mismatch cause a WordPress critical error?

Yes, PHP version mismatches are a common cause of WordPress critical errors. When your hosting provider upgrades their servers to a newer PHP version, plugins or themes that were written for older versions may use deprecated or removed functions, triggering fatal errors. This often catches site owners off guard because they did not make any changes themselves. Check your debug log for errors mentioning undefined functions or deprecated code. The fix usually involves updating the offending plugin or theme to a version compatible with your current PHP version, or temporarily rolling back the PHP version through your hosting control panel.

Avatar for Paul Clapp Paul Clapp
Co-Founder at Priority Pixels

Paul leads on development and technical SEO at Priority Pixels, bringing over 20 years of experience in web and IT. He specialises in building fast, scalable WordPress websites and shaping SEO strategies that deliver long-term results. He’s also a driving force behind the agency’s push into accessibility and AI-driven optimisation.

Related Web Design Insights

The latest on web design trends, UX best practices, responsive development and building websites that convert.

Website Redesign Planning Guide: How to Manage a Redesign Without Losing Traffic
B2B Marketing Agency
Have a project in mind?

Every project starts with a conversation. Ready to have yours?

Start your project
Web Design Agency