Key takeaways
- The message means PHP hit a fatal error, usually after a plugin, theme or PHP update. It is almost always fixable without losing content.
- Check the admin email for a recovery mode link first, then use the error log or rename plugin folders to find the culprit.
- Take a backup before you change anything, and test future updates on a staging copy so a fatal error never reaches customers.
"There has been a critical error on this website" means WordPress hit a fatal PHP error and stopped loading the page rather than showing broken code. The cause is almost always a plugin, a theme or a server change such as a PHP upgrade, and in most cases you can get the site back without losing any posts, pages or orders.
This guide is for UK small business owners who have opened their website and found that message instead of their homepage. It walks through the safe order of checks, from the recovery email WordPress sends to switching off plugins by hand, and finishes with the habits that stop the same thing happening next month.
What the message actually means
WordPress runs on PHP, a programming language your web server executes every time someone loads a page. When a piece of PHP code fails so badly that it cannot continue, it is called a fatal error. Older versions of WordPress showed a blank white screen in that situation. Newer versions catch the failure and show a short, polite message instead, so visitors do not see technical details that could help an attacker.
The message itself does not tell you what broke. It is a symptom, not a diagnosis. Your job is to find which piece of code failed, switch it off or roll it back, and then decide on a proper fix.
Sometimes only the public site is affected and the dashboard still works. Sometimes both are down. Sometimes only one page or one action fails, such as the checkout or a contact form. Note which of these you are seeing, because it narrows the search.
Common causes
| Cause | Typical trigger | First thing to try |
|---|---|---|
| Plugin conflict or bug | A plugin updated automatically or by hand | Deactivate the most recently updated plugin |
| Theme error | A theme update or an edit to functions.php | Switch to a default WordPress theme |
| PHP version change | The host upgraded PHP on the server | Check which plugin or theme does not support the new version |
| Memory limit reached | A heavy plugin, large import or busy page | Ask the host about the PHP memory limit |
| Corrupted or incomplete files | An update that timed out part way | Reinstall the affected plugin or WordPress core files |
| Custom code snippet | A snippet pasted into the theme or a snippets plugin | Remove or disable the snippet |
In our experience of maintaining WordPress sites, the first two rows account for most cases. Think about what changed recently: an update, a new plugin, a hosting change or a code edit. The answer is usually there.
Before you touch anything: take a backup
It is tempting to start switching things off straight away. Take a few minutes first to make sure you have a recent backup of both the files and the database. Most UK hosts keep daily backups in the control panel, and many offer a one-click download. If your host does not, or you are not sure, our guide to a website backup and recovery plan explains what a good backup covers.
If you run an online shop, note the time the error started. Orders placed by customers on other parts of the site may still have reached the database, and you do not want to restore an old backup over them without checking.
How to fix "There has been a critical error on this website"
Work through these steps in order. Stop as soon as the site is back, then move on to the section about finding a permanent fix.
- Check the admin email inbox. When a fatal error happens, WordPress usually emails the site administrator address with the name of the plugin or theme involved and a special recovery mode link. Check spam folders too.
- Use recovery mode if you have the link. The link lets you log in to the dashboard with the faulty plugin or theme paused. From there you can deactivate it properly, look for an update, or replace it.
- Look at the error log. Your hosting control panel normally has an error log for each site. The most recent fatal error line names a file path, and that path usually includes the folder of the plugin or theme at fault.
- Deactivate plugins by renaming folders. If you cannot reach the dashboard, open the file manager or connect by SFTP, go to wp-content, then plugins. Rename the folder of the suspect plugin, for example by adding "-off" to the end. WordPress will treat it as deactivated. If you are not sure which plugin it is, rename the whole plugins folder, check the site, then rename it back and switch plugins on again one at a time from the dashboard.
- Switch the theme. If plugins are not the problem, rename your active theme folder inside wp-content, then themes. WordPress will fall back to an installed default theme, if one is present. The site will look different, but it should load.
- Reinstall WordPress core files if needed. If an update was interrupted, the dashboard Updates screen has an option to reinstall the current version. This replaces core files without touching your content, but take the backup first.
- Restore a backup as a last resort. If nothing else works and you know when the site last worked, restoring that backup will get you online. Remember that anything added since, such as orders or form entries, may be lost.
If the site is a client-facing business tool and you are uneasy about file managers, it is perfectly reasonable to stop at step one and call your developer or host. A calm half-hour with someone who does this often is better than a rushed fix.
Turning on debug mode safely
If the error log is empty or unclear, WordPress has a debug setting that records more detail. It is switched on in the wp-config.php file in your site's main folder. The setting can show errors on screen, which you do not want on a live business site, so the safer approach is to log errors to a file and keep on-screen display off. Your host or developer can set this up in a minute.
Turn debug logging off again once you have the information you need. Debug files can grow large and may contain details you would not want public, so delete the log afterwards.
Finding a permanent fix
Getting the site back is the emergency. The permanent fix depends on what you found.
- A plugin bug. Check whether the developer has released a fix. If the plugin has not been updated for a long time, it may be time to replace it. Our WordPress plugin audit guide explains how to judge whether a plugin still deserves a place on your site.
- A clash between two plugins. Sometimes each plugin works alone but not together. Contact both developers, or replace the less essential one.
- A theme problem. If you edited the theme directly, those edits may have been overwritten or broken by an update. Moving custom code into a child theme stops that happening again.
- A PHP version change. Newer PHP versions remove old functions. Updating the plugin or theme that relied on them is the real fix. Rolling PHP back should only ever be a short-term measure while you update.
- Memory limits. Raising the memory limit can help, but a site that keeps hitting it often has a heavy plugin or bloated database worth looking at.
How to stop it happening again
Fatal errors are rarely random. They follow changes. The way to prevent them is to control when and how changes reach your live site.
- Test updates on staging first. A staging copy of your site lets you run updates and see what breaks before customers do. Our guide to website staging and testing covers the basics.
- Be deliberate about automatic updates. Automatic updates are useful for security, but switching them on for every plugin on a complex site raises the risk of a surprise. Read our guide to WordPress automatic updates to decide what to automate.
- Check Site Health regularly. The WordPress Site Health screen flags outdated PHP, inactive plugins and other warnings before they become outages.
- Keep the admin email address current. The recovery email only helps if it reaches someone who reads it. If the address belongs to a former employee or an old agency, change it.
- Keep plugins lean. Every plugin is code someone else maintains. Fewer, better-supported plugins mean fewer chances of a clash.
When to get help
If the error keeps coming back, affects your checkout or appears after a hosting change you did not ask for, it is worth getting a developer involved. The same applies if you find unfamiliar files or code during your checks, because a fatal error can occasionally be a side effect of a compromised site. Our WordPress security guide covers the warning signs.
At Prism Works Studio we build and look after WordPress sites as part of our website and ecommerce development work, including updates, testing and fixing errors like this one. You can see how our website projects and retainers are structured on our pricing page.
FAQs
What does "There has been a critical error on this website" mean?
It means WordPress hit a fatal PHP error and stopped loading the page. The cause is usually a plugin, theme or PHP version change. Your content is normally still safe in the database.
Will I lose my content if I see this error?
Usually not. The error stops pages loading, but posts, pages and orders are stored in the database and are not normally affected. Take a backup before making changes, and be careful about restoring an old backup over newer orders.
I did not get the recovery mode email. What now?
Check spam folders and confirm which address is set as the site administrator email. If the email never arrived, use the error log in your hosting panel or rename plugin folders by file manager or SFTP to find the cause.
Can my hosting company fix a WordPress critical error?
Many hosts will help you read the error log, restore a backup or adjust the PHP version or memory limit. Fixing faulty plugin or theme code is usually outside their support, so you may need a developer for the permanent fix.
Why did the error appear when I had not changed anything?
Something may have changed without you doing it. Automatic plugin updates and server-side PHP upgrades are the most common silent changes. Check your plugin update history and ask your host whether the server was updated.
Is it safe to roll back to an older PHP version?
Only as a short-term measure. Older PHP versions stop receiving security fixes, so the proper solution is to update or replace whatever does not support the newer version. Check your host's current guidance on supported versions.