“There has been a critical error on this website” means a PHP fatal error stopped WordPress from building the page, and the cause is almost always a plugin, the theme, or a PHP version change on the server. You can usually fix it in under an hour: get back in through recovery mode or by switching plugins off from the file system, read the error log to find the exact file, then update, replace or roll back that one component.
I manage a large portfolio of business websites, and this message is one of the most common panic emails I get. It looks catastrophic because the whole site stops loading, but your posts, pages and settings are still sitting in the database. Here is the order I work through it.
WordPress runs on PHP. When a plugin, theme or custom snippet calls a function that does not exist, runs out of memory, or uses code the server’s PHP version no longer accepts, PHP throws a fatal error and stops. Since WordPress 5.2, instead of a blank white screen, WordPress catches that error, shows visitors the generic critical error message, and offers administrators a way in through recovery mode.
The usual triggers I find:
Check the inbox of the site’s administrator email first. When WordPress detects a fatal error on a normal page load, it emails that address a special login link. Logging in through it starts recovery mode: the plugin or theme causing the error is paused for your session only, the dashboard tells you which one it is, and you can deactivate it without visitors seeing anything change. When you are done, click “Exit Recovery Mode”.
That email often never arrives. If the error happens before your email plugin loads, WordPress sends it straight from the web server, and those messages are easy to lose to spam filters. If nothing shows up after a few minutes, go in through the files instead:
Switching plugins on and off works, but the error log names the culprit directly. There are two places to look. Your host’s PHP error log is the first: many control panels have an error log viewer, and some hosts write an error_log file in the site’s root folder. The second is WordPress’s own debug log. Add these lines to wp-config.php, above the line that says “That’s all, stop editing”:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
Reload the broken page, then open wp-content/debug.log. Look for a line starting with “PHP Fatal error”. It names the file and the line number, and the folder in that path tells you which plugin or theme it belongs to.
Turn this off when you are done. The WordPress documentation says debugging tools should not stay on for a live site, and a debug.log in wp-content can often be opened in a browser by anyone who knows the address. If you need logging on for longer, set WP_DEBUG_LOG to a file path outside the public web folder instead of true.
Deactivating the plugin brings the site back, but if it runs your forms, bookings or checkout, you have swapped one problem for another. What to do next depends on what the log says:
Most of the critical errors I deal with come from the same habit: updating everything at once on the live site with no recent backup and no way to test. A few changes make a big difference:
If the site makes you money and nobody on your team is comfortable in SFTP and log files, this is the kind of fix I handle through my WordPress speed, security and technical SEO service. Send me the URL and roughly when it broke, and the logs usually show what failed.
If you would rather not handle this yourself every month, that is what my WordPress care plans cover: updates tested on staging, daily offsite backups and monitoring, with a developer who knows your site.
No. The error stops PHP from building the page, but your posts, pages and settings stay in the database. Once the faulty plugin or theme is fixed, the site comes back as it was.
WordPress sends it to the administrator email address set in Settings, General. If the error happens before your email plugin loads, the message goes straight from the server and is often filtered as spam or blocked. Check spam, and if it is not there, use the plugin folder method instead.
Yes. Newer PHP versions remove old functions and are stricter about code that older versions tolerated, so an outdated plugin or theme can fail right after the host upgrades PHP. The error log will name the plugin, and the fix is to update or replace it.
Lucas Alvarado — Senior marketing technology and web operations consultant. HubSpot, Salesforce, Pardot, and high-traffic WordPress for B2B revenue teams. Based in Miami, working with companies across the US.