Guides / WordPress
How do I fix "There has been a critical error on this website" in WordPress?
By the WebFixed team. Last updated 21 September 2026.
The short answer
The message "There has been a critical error on this website" means a piece of PHP code, the language WordPress runs on, has crashed. In most cases the cause is a plugin, less often the theme, and sometimes a change of PHP version at your host. First check the inbox of your site’s administration email address for a message from WordPress with a recovery mode link, which lets you log in and deactivate the plugin or theme that failed. If no email arrives, rename the plugin’s folder using FTP or your host’s file manager, which switches that plugin off and usually brings the site back.
What causes the critical error
WordPress shows this message instead of a blank page when a fatal PHP error stops the page from loading. The site’s content and database are almost always untouched. The usual causes, starting with the most common, are:
- A plugin update that contains a bug or clashes with another plugin.
- A plugin or theme that does not work with the PHP version your host is running, often after the host has moved you to a newer PHP release.
- A theme update, or custom code added to the theme’s functions.php file.
- The site running out of PHP memory, which is the amount of server memory each page is allowed to use.
- A failed or half-finished update that left files missing.
Use the recovery mode email first
When WordPress detects a fatal error it emails the address set under Settings, then General, as the Administration Email Address. The subject line is usually "Your Site is Experiencing a Technical Issue". The email names the plugin or theme that caused the error and contains a special login link.
- Search the inbox and the spam folder of the administration email address for a message from WordPress.
- Click the recovery mode link in the email and log in with your normal username and password.
- WordPress opens the dashboard with the faulty plugin or theme paused, and shows a notice saying which one it is.
- Go to Plugins, then Installed Plugins, and click Deactivate on the plugin named in the notice. If the theme is named, go to Appearance, then Themes, and activate a different theme.
- Click Exit Recovery Mode in the bar at the top of the screen, then open the site in a private browser window to check it loads.
If there is no email: switch plugins off through the file manager
Many sites cannot send email reliably, so the recovery message never arrives. You can switch plugins off without the dashboard by renaming their folders. Use the file manager in your hosting control panel, or an FTP program such as FileZilla with the FTP details from your host.
- Open the folder that contains your site, often called public_html, then open wp-content, then plugins.
- If you know which plugin was updated or installed last, rename its folder by adding -off to the end of the name. This deactivates that one plugin.
- Reload your site. If it is back, you have found the cause.
- If you do not know which plugin is at fault, go up one level and rename the whole plugins folder to plugins-off. This deactivates every plugin at once.
- If the site now loads, rename the folder back to plugins, log in to the dashboard, and reactivate the plugins one at a time under Plugins, then Installed Plugins, reloading the site after each one until the error returns.
Renaming a folder does not delete the plugin’s settings, which are stored in the database. Do not delete plugin folders unless you are sure you no longer need the plugin.
Check the theme and the PHP version
If the error remains with every plugin switched off, test the theme. In wp-content, then themes, rename the folder of your active theme. WordPress will fall back to a default theme such as Twenty Twenty-Five, provided one is still installed. Your site will look different while you test, and your theme settings return when you rename the folder back and reactivate the theme.
Next check the PHP version. Most hosting control panels have a PHP version or PHP settings page. If your host recently moved the site to a newer version, switch back one version and reload the site. If that fixes it, an out of date plugin or theme is the real cause and needs updating or replacing, because older PHP versions stop receiving security fixes.
Turn on the debug log to see the exact error
WordPress can write the full error to a log file, which tells you the exact file and line that failed. Download a copy of wp-config.php before editing it, because a typing mistake in this file will take the site offline.
- Open wp-config.php, which sits in the main folder of your site, in the file manager’s editor.
- Find the line that says define( 'WP_DEBUG', false ); and change false to true.
- Directly underneath, add these two lines: define( 'WP_DEBUG_LOG', true ); and define( 'WP_DEBUG_DISPLAY', false );
- Save the file and reload the broken page once.
- Open wp-content and look for a file called debug.log. The most recent lines marked "PHP Fatal error" include a file path, and the folder name in that path shows which plugin or theme is responsible.
- When you have finished, set WP_DEBUG back to false and delete debug.log, because the log can be read by anyone who guesses its address.
Restore a backup if nothing else works
Most hosts keep daily backups that you can restore from the control panel, and backup plugins such as UpdraftPlus keep their own copies. Restore the most recent backup from before the error started. Restoring the files only, and leaving the database alone, is often enough after a bad update and avoids losing anything recent.
A full restore replaces the database as well, so any orders, form entries, comments or edits made after the backup date will be lost. On a shop, export recent orders first if you can reach them.
When to get help
It is sensible to stop if the recovery email never arrives and you are not comfortable using FTP or the file manager, if the debug log points at WordPress core files or the database, or if the error comes back every time you reactivate a plugin the site depends on. Get help straight away if this is a shop that is losing orders while it is down. WebFixed fixes this kind of problem for a fixed price agreed up front, with one-off fixes from £39 including VAT and nothing charged until you accept the quote.
Related questions
- Will I lose my content because of the critical error?
- No. The error stops pages from being displayed, but your posts, pages, products and images remain in the database and the uploads folder. They reappear once the faulty plugin, theme or setting is dealt with.
- Why did I not receive the recovery mode email?
- The email goes to the administration email address in Settings, then General, which is often an old address or the address of whoever built the site. Many hosts also send WordPress email unreliably, so it may have been blocked or marked as spam.
- Does the critical error mean my site has been hacked?
- Usually not. It is nearly always a code fault after an update or a PHP version change. If the debug log mentions files you do not recognise, or the error appeared with no updates at all, a malware scan is worth doing.