Oops, WordPress Broke Again! Fixing the Critical Error Made Easy
Fix WordPress critical error: 7 Proven Fixes for 2025 Success
When WordPress Breaks: Understanding the Critical Error Crisis
“There has been a critical error on this website.” Few messages trigger more panic for business owners who rely on WordPress. A single fatal PHP error can wipe out sales, wreck SEO, and leave customers wondering whether you are still in business.
The good news? WordPress 5.2 and newer include a built-in recovery system that can get you back online in minutes—if you know how to use it. In this guide you will learn:
- The real meaning behind the critical error message.
- A five-step quick-fix that often restores a site in under 60 seconds.
- Deeper troubleshooting for stubborn problems (plugins, themes, core files, memory limits, database issues, and malware).
- Preventive maintenance to stop the error from coming back.
wpOncall has handled thousands of these emergencies over the last fifteen years. The workflow below distills what consistently works for our clients in Santa Rosa, CA and around the world.
30-Second Quick Fix
- Check the admin email for a recovery-mode link.
- Click the link to enter safe mode.
- Deactivate the plugin or theme named in the email.
- Test the site in an incognito window.
- Exit recovery mode when everything loads.
No email? Add ?action=entered_recovery_mode to your login URL or temporarily rename the /wp-content/plugins/ folder by FTP to disable every plugin at once.
What Does “There Has Been a Critical Error on This Website” Really Mean?
A critical error is WordPress’s new (and kinder) version of the old white screen of death. When PHP hits a fatal error—usually from broken plugin or theme code—WordPress stops execution and throws this message to protect your data.
Why it is helpful:
- WordPress emails the site owner with the exact file and line number that failed.
- The email link launches recovery mode, isolating the bad code so you can still log in.
Common triggers:
- Two plugins declaring the same function.
- An outdated theme using removed WordPress functions.
- PHP running out of memory.
Critical Error vs. White Screen of Death
Before WP 5.2 you saw a blank page and zero clues. Now you get context, a recovery link, and a chance to fix the issue without touching the server directly.
Back Up Before You Touch Anything
Even a quick fix can go sideways. Create a full file and database backup first. Use your host’s snapshot tool or download files over FTP and export the database with phpMyAdmin. Store a copy off-site for safety.
Need a refresher on logs? See our article on WordPress Error Logs.
Fix WordPress Critical Error: Immediate Recovery Steps
WordPress’s recovery mode is your fastest path to daylight. Here’s how to use it effectively.
1. Enter Recovery Mode
- Check the “Your Site is Experiencing a Technical Issue” email.
- Click the one-time recovery link (or append
?action=entered_recovery_modetowp-login.php). You will log in as usual but with error-causing code disabled.
2. Deactivate the Faulty Component
- If the email cites a plugin, go to Plugins > Installed Plugins and click Deactivate.
- If it cites a theme, switch to a default theme such as Twenty Twenty-Four under Appearance > Themes.
3. Confirm in a Private Window
Open an incognito browser to bypass cache. Load several pages and key functions (cart, forms, search). If everything works, return to the dashboard and click Exit Recovery Mode.
4. No Email? Use FTP to Disable All Plugins
- Connect via your host’s file manager or FileZilla.
- Rename
/wp-content/plugins/to/plugins-disabled/. - Reload the site. If it works, a plugin is at fault. Rename the folder back and re-enable plugins one at a time until the error returns.
If recovery mode fixes the problem, you are done. If not, move to the deeper troubleshooting below.
Deep-Dive Troubleshooting: Plugins, Themes, and Core Files
When recovery mode alone does not solve the problem, isolate the root cause systematically.
Deactivate All Plugins in Seconds
Rename /wp-content/plugins/ to stop every plugin at once. If the site loads, activate plugins one by one—testing each time—until the error reappears. The last plugin activated is the culprit. Replace it, update it, or find an alternative.
More info about WordPress Issues
Switch to a Default Theme
Themes break when they call deprecated functions or bundle outdated copies of page builders. Rename your active theme folder (e.g., mytheme-disabled). WordPress will fall back to Twenty Twenty-Four automatically. If the site loads, contact the theme developer or replace the theme.
Replace Corrupted Core Files
- Download the current WordPress zip from wordpress.org.
- Delete
wp-contentandwp-config.phpfrom the download so you do not overwrite your content or settings. - Upload the remaining files via FTP, overwriting existing ones.
Restore from a Clean Backup
If none of the above works, roll back to a snapshot taken before the error. Most managed hosts keep at least 14 days of backups and allow one-click restores. Verify the restored site on a staging URL first.
Popular backup plugins include UpdraftPlus, BlogVault, and Duplicator. Always test a restore periodically so you are not guessing during a crisis.
Advanced Fixes: PHP Memory, Version, Database, and Malware
Increase PHP Memory
Add the following to wp-config.php (above the comment “stop editing”):
define('WP_MEMORY_LIMIT', '256M');
If your host allows, 256 MB is a safe modern baseline. Some image-heavy or WooCommerce stores may need 512 MB.
Update PHP
WordPress recommends PHP 7.4 or higher. PHP 8.1 offers speed and security gains. Change the PHP version in your hosting control panel, then test your site. See the official PHP compatibility guide.
Enable Debugging
Add to wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Review /wp-content/debug.log for the exact error message and stack trace.
Repair and Optimize the Database
Add this temporary line:
define('WP_ALLOW_REPAIR', true);
Visit yoursite.com/wp-admin/maint/repair.php and select Repair and Optimize. Remove the constant afterward. Large autoloaded data? Clean it with a database plugin or phpMyAdmin.
Scan for Malware
Run an external scan with Sucuri SiteCheck: https://sitecheck.sucuri.net/. Look for unfamiliar files, suspicious base64 strings, or rogue admin users. Clean manually or use a security service, then change all passwords immediately.
Preventing Future WordPress Critical Errors
An hour of prevention beats a day of emergency repair. wpOncall’s maintenance plans revolve around four pillars.
Automated Backups
Schedule daily file and database backups, store at least three copies (local, cloud, and off-site), and test a restore every month. A backup you have never restored is not a backup.
Staging Before Updating
Always apply core, plugin, and theme updates on a staging clone first. Many hosts offer one-click staging. Verify checkout, forms, and performance before pushing changes live.
Continuous Monitoring
- Use Tools > Site Health for built-in checks.
- Review error logs weekly for recurring warnings.
- Install Pingdom or UptimeRobot for downtime alerts.
- Query Monitor can flag slow queries and hidden PHP notices.
More info about WordPress Troubleshooting
Security Hardening
- Strong, unique passwords plus two-factor authentication.
- Remove unused plugins and themes.
- Correct file permissions (644 for files, 755 for directories, 600 for
wp-config.php). - Rate-limit logins and protect forms with CAPTCHA.
- Run weekly malware scans and update promptly.
Frequently Asked Questions about Fix WordPress Critical Error
What causes the error most often?
In our experience 60 % of cases trace back to plugin conflicts, 25 % to theme issues, and the rest to memory limits, database corruption, or malware.
I am locked out of wp-admin—what now?
Rename /wp-content/plugins/ via FTP or File Manager to disable all plugins, then reload the site. If it works, log in, rename the folder back, and reactivate plugins one at a time until the failure returns. You can also force recovery mode with ?action=entered_recovery_mode on the login URL.
When should I call my host or wpOncall?
Contact support if you suspect server-level limits (PHP version, memory cap), database corruption you cannot repair, or any sign of malware. E-commerce sites losing sales should escalate immediately—every minute matters.
Conclusion
A WordPress critical error is disruptive, but it is rarely fatal. With recovery mode, systematic plugin and theme isolation, and a few advanced tactics, most sites are back online within the hour. Build solid habits—backups, staging, monitoring, and security—and you will spend far less time firefighting and far more time growing your business.
Need help right now? wpOncall’s WordPress experts are on standby 24/7 to secure, repair, and optimize your site so you can focus on running your company.