If you are a seasoned WordPress user, you have probably come across any number of issues, including the critical error in WordPress, technical challenges, and the feared White screen of death.
But do not worry because WordPress has now a Recovery Mode is here to save you as a quick and painless method to address those issues.
On May 2019, WordPress 5.2 was released, and WordPress Recovery Mode was introduced as a core feature.
This mode allows admins to access the backend even while the website was displaying a fatal error is occurring. In a nutshell, it aims to make easier to fix fatal errors on a WordPress website that would otherwise cause issues such as the parse/syntax error or the White Screen of Death – a previously impossible task for non-developers.
Instead of just letting the fatal error happen, WordPress can automatically trigger a recovery mode when we try to connect to the WordPress Dashboard with an appropriate URL. When a WordPress site is in recovery mode, we will still be able to access the backend WordPress Dashboard via a special link, which gives us a chance to fix the problem.
If the WordPress site is example.com, then you may use the following link to access the WordPress Dashboard in Recovery mode
WordPress Recovery Mode URL ⇒ https://example.com/wp-login.php?action=enter_recovery_mode
Also, the WordPress Recovery Mode is something that triggers automatically, which means it is not something that we can manually enable.
That might have us wondering what are the types of errors that will trigger the Recovery Mode. In general, the Recovery Mode is triggered whenever WordPress detects any changes that will break the site. This change could come from a faulty plugin or theme that we have installed. Or, if we are trying to make custom changes to the WordPress code.
While in the Recovery Mode, WordPress will perform the following actions, when it detects that a fatal error has happened: –
- WordPress will try to automatically “pause” the code that is causing the problem(s) so that we can still access WordPress Dashboard. For example, if the problematic code is in a certain plugin, WordPress will pause that plugin.
- WordPress will try to deliver an email at the email address associated with our administrator account. We can use a special link in this email to open our Dashboard in Recovery Mode.
- WordPress will just show a simple message that says “There has been a critical error on this website”, instead of showing the underlying error in the frontend of the website.
After logging in, the admin user can notice that the recovery mode is enabled. Also, it will tell us which plugins and/or themes are currently paused due to fatal errors, and what exactly these errors are. Then we can address the issue as required using any of the following methods: –
- Completely deactivate the plugin or theme. This is typically a temporary solution but provides an immediate resolution.
- Fix the problem if we have the technical capabilities, and afterwards resume the extension.
- File a support ticket with the author of the respective extension or contact a developer, pointing out the exact error.
At any time, we can exit the Recovery Mode. Exiting recovery mode will wipe the cookie from the client and thus cause all extensions to run as per usual again. But keep in mind, what is broken will remain broken.
Additional actions that can be taken during Recovery Mode…
If we cannot understand what is causing the error on our WordPress website, we can take a few general steps to recover the website.
A site health checker plugin can come in handy to inspect the fault for us. Because the website could have been attacked by malware. Or there may be a theme or plugin at fault. A health check plugin can detect possible malware attack including the website’s broken code. We may also integrate a malware scanner into our website to check if hackers have attacked our website.
We can further delve into the developer documentation of the Recovery Mode, including details on the related function wp_is_recovery_mode() at https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/