There Has Been a Critical Error on This Website: How to Fix It in WordPress (Recovery Mode Explained)
What the WordPress critical error message means, how Recovery Mode and its one-day email link work, why the email sometimes never arrives, and a step-by-step order for fixing it: folder rename, debug log and common causes.
zabil
You open your website and instead of your homepage there is a plain page: “There has been a critical error on this website.” No menu, no design, and maybe no way into the dashboard either. It looks like a disaster, but it is WordPress catching a fatal PHP error and stopping early. WordPress’s own documentation says such an error is often caused by a plugin, a theme or custom code.
This guide explains what the message means, how WordPress’s built-in Recovery Mode works, why its email sometimes never arrives, and a step-by-step order for fixing the problem. It is based on the WordPress documentation and on the WordPress 7.1.5 source code installed on our own server, read on 2 December 2026. We have not triggered this error on a live client site for this article, so the behaviour described comes from the documentation and the code.
What the message means
WordPress’s troubleshooting page says the message indicates “something in your site has caused a critical error that prevents WordPress from running as expected”. It lists the most common causes as “conflicts between plugins, compatibility issues with your theme, running an incompatible PHP version, hitting the memory limit, or having corrupted WordPress files”.
In the code, WordPress watches for fatal PHP errors (the error types E_ERROR, E_PARSE, E_USER_ERROR, E_COMPILE_ERROR and E_RECOVERABLE_ERROR). When one happens it shows the message with an HTTP 500 response. You may see three versions of the text:
- On a public page: “There has been a critical error on this website.” with a link to WordPress’s troubleshooting page.
- On the login page or the dashboard: the same sentence plus “Please check your site admin email inbox for instructions.”
- Inside Recovery Mode: a note that the site is in recovery mode and that you should check the Themes and Plugins screens.
Step 1: think about what changed
Before touching anything, ask what happened just before the error. A plugin or theme update, a new plugin, code pasted into functions.php, or a hosting change to the PHP version are the usual triggers. Our guides to checking your PHP version and to WordPress auto-updates cover two of them. Take a backup first if you can reach one (see WordPress backups).
Step 2: look for the recovery email
Recovery Mode was added in WordPress 5.2. WordPress’s developer note says the email goes to the admin address and contains a secret link, and that clicking it places a cookie on that browser. The email’s subject is “Your Site is Experiencing a Technical Issue” with your site name in front.
What the code adds:
- Where it goes. It goes to the Administration Email Address in Settings, General, unless a
RECOVERY_MODE_EMAILconstant inwp-config.phpnames another address. - How often. By default one email is sent per day, and the link is valid for that same day. The email says a new link will be sent if the error occurs again after it expires.
- When it is sent. The code only sends the email when the failing request is the login page, the dashboard or a few admin Ajax actions, not an ordinary public page. So if you have only looked at the front of the site, try opening
/wp-login.phpyourself. This is our reading of the code, not a line in the documentation. - When it is not sent. WordPress attributes an error to a plugin or theme only if the failing file is inside the plugins or themes folder. Otherwise the code returns the error “Error not caused by a plugin or theme.” and no link is sent.
The documentation also warns that the email may be sent straight from your web server if your mail plugin had not loaded when the error happened. That can land it in spam or block it. If emails from your site go missing in general, see our guides on contact form emails not arriving and on SPF, DKIM and DMARC.
Step 3: use the recovery link
Open the link, then log in. The developer note says recovery mode is tied to the cookie on that browser, not to a particular user. Plugins and themes causing a fatal error are paused for that browser only, so everyone else still sees the broken site.
On the Plugins screen the faulty plugin is marked “This plugin failed to load properly and is paused during recovery mode.” with the error shown beneath it. Then you can:
- deactivate the plugin or switch the theme, which is a quick fix that costs you that feature;
- update or reinstall it, or fix your own code if you edited a file;
- send the exact error to the plugin author.
When you are done, use “Exit Recovery Mode” in the admin bar. If the extension is still broken, the error returns, so fix the cause before you leave.
Step 4: no email? Rename the folder
WordPress’s Recovery Mode documentation says you can deactivate a plugin without the dashboard by renaming its folder in wp-content/plugins, through FTP or your host’s file manager. Its example renames hello-dolly to hello-dolly-1. If you do not know which plugin is at fault, its FAQ suggests renaming the whole plugins folder to something like plugins.hold. Log in, rename the folder back, and every plugin stays deactivated until you switch them on one by one, so you can find the culprit. For a theme, the common-errors page says to rename the active theme’s folder in wp-content/themes. Back up first.
Step 5: read the error log
To find the real cause, turn on WordPress’s debug log. The Advanced Administration Handbook gives this block for wp-config.php, which must go before the line saying to stop editing:
define( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true );define( 'WP_DEBUG_DISPLAY', false );
Errors are then saved to wp-content/debug.log and hidden from visitors. The values are true and false without quote marks, because the handbook warns that ‘false’ in quotes is read as true. The handbook also says these tools are not recommended on live sites, but the troubleshooting page tells you to enable debug mode for a critical error. Our suggestion is to switch it on briefly, read the log, then switch it off and delete the file, because logs show file paths.
Reload the broken page, open the log and find the line starting with PHP Fatal error. If the path in it contains wp-content/plugins/ followed by a folder name, that plugin is your suspect. The code uses the same rule to blame a plugin.
Step 6: match the message to a fix
The common-errors page lists several messages:
- Allowed memory size exhausted: raise the limit with
WP_MEMORY_LIMITinwp-config.php, or ask your host. In the code, WordPress sets the limit to 40M on a single site when the server lets it change the limit. - Call to undefined function: the page links it to a failed automatic install or upgrade, an incompatible plugin or theme, or a misspelt function in
functions.php. Reinstall manually, or remove the plugin or theme. - Syntax error after editing code: the page says to check
functions.phpfor mistakes. - PHP version problem: see our PHP version guide and ask your host which version you are on.
- Maximum execution time exceeded: the page says the process is timing out and lists ways to raise the limit.
Step 7: finish properly
- Check the public site, the login page and one form.
- Turn off debugging and delete
debug.log. - Confirm the admin email in Settings, General is one you read.
- Update plugins one at a time on your next maintenance window.
- If the log points to WordPress core files or
wp-config.php, or you see files you did not add, call your host or developer. See our guide to a hacked WordPress site.
If you would like someone to keep your plugins, backups and PHP version in check, tell us about your business or read about our systems and technology services.
Sources read on 2 December 2026: WordPress documentation, Recovery Mode; WordPress Make blog, Fatal Error Recovery Mode in 5.2; Advanced Administration Handbook, Common WordPress errors, Debugging in WordPress and Editing wp-config.php; WordPress FAQ Troubleshooting; WordPress 7.1.5 source (wp-includes/class-wp-fatal-error-handler.php, class-wp-recovery-mode.php, class-wp-recovery-mode-email-service.php, default-constants.php).
Layanan terkait
Karya terkait
Di mana ini telah diterapkan.
Institusi & Organisasi
Departemen MIPA UNHAS
Universitas Hasanuddin
Website resmi departemen yang menyajikan informasi akademik, berita, dan kegiatan, dibangun agar staf dapat mengelolanya sendiri tanpa bantuan teknis.
Institusi & Organisasi
Admission ITH
Institut Teknologi BJ Habibie
Platform pendaftaran mahasiswa baru yang menangani seluruh proses pendaftaran secara online, mulai dari pengisian formulir, unggah dokumen, hingga pembayaran awal.
Institusi & Organisasi
Desa Kalimporo
Desa Kalimporo
Platform profil desa yang menyajikan struktur pemerintahan, data kependudukan, potensi lokal, dan program desa kepada khalayak yang lebih luas.
Baca lebih lanjut
Artikel terkait.
Web Development
WordPress Login Security: Two-Factor Authentication, Login Limits and XML-RPC Explained for Small Business Sites
What the WordPress Handbook recommends against login attacks: two-factor authentication with the Two Factor plugin, a safe rollout order, login limits at the host…
Web Development
SPF, DKIM and DMARC for Small Business: What They Are and How to Set Them Up
What SPF, DKIM and DMARC are, which of Google's Gmail sender rules apply to a small business, and the order to set them up…