The Ultimate Guide to WordPress Recovery Mode

Last Updated on April 26, 2023 by 6 Comments

The Ultimate Guide to WordPress Recovery Mode
Blog / WordPress / The Ultimate Guide to WordPress Recovery Mode

If you are a regular WordPress user, you’ve most likely encountered errors from time to time. The critical error, technical difficulties, or the dreaded WordPress white screen of death can ruin your day and take your site offline, leaving unsuspecting visitors wondering what happened. Not only does this cost you valuable clicks, but it could make visitors never return to your site. Thanks to WordPress recovery mode, those problems are short-lived and a lot easier to fix.

What is WordPress Recovery Mode?

Before the release of WordPress 5.2, you’d typically see the WordPress white screen of death. Since WordPress recovery mode was introduced in May 2019, users generally see an error message on their site when something bad has happened. When a problem is detected, WordPress sends an email to the administrator containing a login link and details about the error.

WordPress Recovery Mode Email

You might be wondering what causes these messages. Most of the time it’s due to broken code or a plugin update gone wrong. Other possible causes are plugin conflicts, a problem with your theme, or custom code that you may have implemented. Whatever the cause, WordPress does a pretty good job of identifying when there is an issue and letting you know about it.

What Happens When WordPress Enters Recovery Mode?

When an error occurs, WordPress will try to identify the problem and isolate it. As mentioned previously, an email is generated and sent to the site administrator. Next, WordPress will disable the faulty code so you can log in to your site to correct the problem. Be mindful that recovery mode doesn’t fix your site for you. It only allows you access to the site so you can correct it. The rest of the world will see the error message, so it’s crucial to fix the problem as soon as possible.

What Can You Do in Recovery Mode?

The best thing about recovery mode is having the ability to troubleshoot errors without the need for FTP. This is very useful when dealing with plugin or theme problems, as well as fixing a broken line of code or two. When you log in to recovery mode, you’ll likely get insight into your issue right in the WordPress dashboard. Recovery mode is indicated by a large red button in the top right corner of the admin bar.

You Can Fix a Faulty Plugin

In this example, you’ll see that the error stems from a plugin not loading properly. The dashboard shows an error message describing the problem and provides you with a link to fix it.

Recovery mode screen

Once you click the provided link, you’re redirected to a new screen that reveals the problem plugin, along with lines of code detailing the specific issues that were encountered. With this example, you have two choices. Deactivate the plugin, or resume using it. Obviously, the safe choice is to deactivate the plugin. You’ll then troubleshoot what happened, and take steps to fix it.

Plugin issue

Troubleshoot Theme Issues

This example gives us a critical error with more specific details as to what caused the error. We deleted a semicolon in our theme’s functions.php file to trigger recovery mode.

Theme Error

WordPress did its thing and generated an email letting us know that there was a problem. As the screenshot shows, there’s a link provided to us to log in to correct the issue. Additionally, WordPress lets us know exactly what the error is.

Broken Theme Email

Once we log in, we see that there was an issue with our theme. WordPress prompts us to click through to the themes screen.

Theme Erorr Link

At this point, we know what the problem is (because we caused it), and correct it. However, if you find yourself in a similar situation, your next course of action should be to disable your theme, check your functions.php file for errors, and enable a default theme while you hunt down the code causing issues.

Does Safe Mode Do the Same Thing as Recovery Mode?

In short, no. Safe mode is generally used by themes such as Divi to disable plugins, custom scripts, and child themes. Additionally, some plugins such as WP Safe Mode offer the same functionality. The difference between recovery mode and safe mode is simple. With recovery mode, the specific plugin or theme causing the issue is disabled rather than all themes and plugins.

Why Would You Need WordPress Recovery Mode?

There are a couple of reasons that WordPress Recovery Mode will come in handy. First, it allows you to identify site errors by displaying different types of error messages on your site. Whether it’s a critical error message, technical difficulties, or simply a PHP error, recovery mode can prove to be useful in solving them. Another possible reason would be that your theme or one of your plugins isn’t supported on your current version of PHP.

Common Errors Displayed in WordPress Recovery Mode

Most of the time WordPress will alert you to an issue by giving you an error message. There are various types of messages you may see, so we’ll help you identify them and what might be the cause for each one.

1. The Critical Error Message

recovery mode critical error message

The Critical Error Message in WordPress Recovery Mode usually consists of the following message:

There has been a critical error on your website. Please check your site admin email inbox for instructions.

Critical Error Message Common Causes

There can be many reasons you have this error message. Most of the time, it can be narrowed down to just a few. Let’s explore the most common causes.

Faulty Plugins

The large number of plugins available for use in WordPress is one of its best features. That being said, it can be a double-edged sword. It’s generally best to do your research when looking to install and use a new plugin for your site. Some are outdated, no longer supported, or incompatible with the most recent version of WordPress, and should be avoided. However, even the best paid plans can get ruined sometimes. In this case, recovery mode is your friend.

Custom Code Gone Wrong

Even seasoned WordPress developers can make mistakes sometimes. WordPress is awesome in that you can customize it to suit your needs. There are ample opportunities to write custom scripts, create custom plugins, or simply use a bit of javascript to enhance a theme’s capabilities. Sometimes, all it takes is a missing semicolon to send the whole thing tumbling down. With recovery mode, you don’t have to worry about building from the ground up when you make a mistake. The problem is usually identified, sometimes down to the exact line of code, allowing you to fix the problem and be back up and running in a jiffy.

Broken or Outdated Theme

Themes are great for making your WordPress stand out from the crowd. Themes like Divi allow you to customize your site extensively, allowing for endless design options. There are thousands of themes on the market. Sometimes when themes are updated, wires get crossed, and your theme could break. Additionally, there are situations when you install a theme and forget to update it. If WordPress releases an updated version that isn’t compatible with your theme, you could get the technical difficulties error message.

2. Technical Difficulties Error Message

technical difficulties

Another reason that you might require recovery mode is when you have the dreaded technical difficulties error message. The Technical Difficulties Error Message in WordPress Recovery Mode usually consists of the following simple, yet quite unnerving, message:

The site is experiencing technical difficulties.

Technical Difficulties Error Message Common Causes

While there could be several reasons why you’re seeing this, the most common problem is a theme or plugin conflict. Other possible causes could be that your site was injected with malware.

Theme Conflict With a Plugin

Sometimes during plugin updates, there could be a conflict with your theme. Reputable theme creators generally do a good job of keeping their framework up to date. However, there are situations when theme updates aren’t enough. As previously mentioned, it’s wise to choose a plugin that has a good reputation with regular updates. Choosing a plugin that hasn’t been tested with your current version of WordPress could cause your site to develop errors.

Plugin Conflict With Another Plugin

Similarly to theme conflicts, plugins can also become incompatible with other plugins. Do your research before installing new plugins. Check support channels as well as the WordPress.org forum page for that specific plugin to learn about potential issues before downloading. When considering a new plugin, there are other options to the WordPress repository you should consider. If you are a Divi user, Divi marketplace is a great place to look for adding new functionality to your website. Additionally, other premium plugin offerings are good options to consider when you need new features for your site.

Your Site Has Been Hacked

Having your website hacked is probably one of the scariest situations a site owner or developer can have. You could be locked out of your website, your site could be redirected, or it could be used by bad actors for nefarious purposes. When your site is hacked, scripts could be running that will throw errors, alerting WordPress to their presence. That’s when recovery mode would kick in.

3. PHP Code Errors

Sometimes you won’t see a critical or technical difficulties error message. There could simply be a few lines of PHP on your screen. In that case, it’s usually caused by a problem with your theme. Your theme could be outdated, have missing code, or have custom code you implemented causing a conflict.

4. Your Version of PHP is Causing Issues

Another thing to evaluate is the version of PHP running on your site. Sometimes the problem is easily corrected by switching to a different version. For instance, if your theme is outdated with no new version available, rolling back PHP to an older version may solve the issue. However, WordPress doesn’t recommend rolling back farther than 7.4. Doing so leaves your site vulnerable to security issues and slower performance. Our Divi Theme currently supports PHP version 8.0+ and recommends at least PHP version 7.4 as a hosting requirement for these reasons. That said, solving the issue may not be easy and may require you to abandon dated plugins and/or upgrade your hosting provider.

You can also check your WordPress site health status using WordPress’ built-in site health feature. To check on the site health for WordPress, navigate to Tools > Site Health from the dashboard. this should show you whether or not you are using an outdated version of PHP, among other critical issues and recommendations.

wordpress site health check

How to Enter WordPress Recovery Mode

There are three ways you can access recovery mode:

  1. Accessing the WordPress Recovery Email. This involves clicking the link provided in the WordPress recovery mode email.
  2. Accessing WordPress Recovery Mode Manually via wp-config.php. This involves adding a line of PHP code to your wp-config.php file via FTP if you don’t have access to your administrator email.
  3. Adding Recovery URL Manually. This involves manually recreating the recovery mode URL.

Let’s explore these methods in more detail.

Accessing the WordPress Recovery Email

The first step to ensure recovery emails is to be sure your administrator email address is correct in WordPress. You’ll want to do this before you have an issue, because you may not have access to your wp-admin dashboard. Having an incorrect admin email will prevent you from being able to utilize recovery mode the easy way.

To check this, log in to your WordPress site and navigate to settings. Next, click on general. Look for the WordPress administration email address. If your email address is correct, you should be able to receive recovery emails in the event of a problem.

recovery email address

When an error occurs, WordPress will send you an email address alerting you to a problem on your site. The link contained in the email will bring you to the recovery login screen. Once logged in, details about your error will be visible to you — enabling you to correct the problem.

How To Access WordPress Recovery Mode Manually

WordPress recovery mode is a great feature, but what if you don’t have access to the admin email and need to change it? There are times when you won’t have access to the back end of your site to change your email, so you’ll need to try different ways to enable recovery mode.

Edit Your Wp-config.php File

For this example, you’ll use an FTP program such as FileZilla to edit your wp-config.php file. You’ll need to define an email address so that WordPress will know where to send your alert messages. We’ll use FileZilla to show you how to edit the file.

First, open FileZilla and establish a connection to your server. You can find and generate SFTP credentials through most WordPress hosting providers. Once you have the information needed to establish a connection, click on site manager.

FileZilla site manager

When the dialog box appears, either click a current site or add a new one by clicking on new site. Choose SFTP from the drop-down menu, then enter your host and port. Next, choose normal from the logon type menu, fill in your user and password information, then click connect.

FileZilla connection

Navigate to the wp-config file by selecting the root /public-html/ folder. Select the wp-config.php file, then click view/edit.

edit wp-config

Next, add the following line of code to the file. Be sure to change [email protected] to your email address.

define( 'RECOVERY_MODE_EMAIL', '[email protected]' );

Finally, click save. Adding the code tells WordPress to send the recovery email to the administrator email address specified in your WordPress settings. Keep in mind that if the system has already generated an email on that day, you’ll need to wait 24 hours before receiving another one. This won’t always work for you, so let’s explore another way.

Add Recovery URL Manually

If you can’t wait 24 hours for WordPress to send out the recovery email, there is another method to try. You can manually generate a recovery link to gain access to the site.

Open your site’s home page in your browser. Next, add this behind the URL.

/wp-login.php?action=entered_recovery_mode

We’d like to mention that this worked on most of the sites we attempted this fix on. That being said, if you use a plugin or another method to mask your wp-admin login URL, you’ll need to use a variation of the link below. Be sure to replace /custom-login/ with your custom login URL suffix.

/custom-login/?action=entered_recovery_mode

When you manually recreate the recovery URL, you may not get those handy errors telling you where the problem lies. In that case, you’ll want to put your troubleshooting cap on and get to work.

How to Exit Recovery Mode

Exiting recovery mode is quite easy. WordPress provides a couple of links for you to exit. The first is by clicking the red exit recovery mode button in the wp-admin panel’s top bar. The second is by clicking the link next to the error message in the dashboard.

exit recovery mode

It’s important to note that you should be sure you’ve corrected any issues before exiting recovery mode. If you do so without fixing the problem, your site will continue to display error messages, making your site inaccessible to visitors.

What if You Can’t Exit Recovery Mode?

In rare cases, you may find yourself unable to exit recovery mode even after you’ve solved the problem. In those situations, you’ll want to enable debugging to try and identify what the issue is. There are several ways to approach this.

First, you can edit your wp-config.php file. To do this, open your wp-config.php file through FTP. The first line should already be present. You’ll simply want to change false to true. The second line will need to be added. This basically tells WordPress to make the debug log viewable. This method is valuable if you still don’t have access to the back end of your site.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

The second way is best utilized when you do have access to the back end. There are several debugging plugins available on the WordPress repository. One we recommend is Health Check and Troubleshooting. It’ll give you a good idea of what’s going on on your site, and can assist you in solving problems.

The last option is to use debug mode in your hosting provider. Providers such as Flywheel provide a simple way to enable debugging on your site using debug mode in the Flywheel dashboard.

What if Recovery Mode Didn’t Solve Your Problem?

WordPress recovery mode is a great feature to help you identify and correct problems on your website. Most of the time, the issue can easily be traced back to a plugin, theme conflict, or errors in custom code. However, there could be situations where additional troubleshooting is required. If our previously mentioned methods aren’t working for you, try troubleshooting your way through some common WordPress errors to bring your website back from the brink of death.

Have you experienced issues with WordPress in the past? What did you do to correct the problem? Leave us a comment below.

Featured Image Kniazeff / shutterstock.com

Divi

Want To Build Better WordPress Websites? Start Here! 👇

Take the first step towards a better website.

Get Started
Divi
Premade Layouts

Check Out These Related Posts

What Size Image To Use On WordPress (Key Factors & Tips)

What Size Image To Use On WordPress (Key Factors & Tips)

Posted on November 17, 2024 in WordPress

Are you experiencing slow website loading speeds? The low website speed could result from many factors, and large image sizes are one of them. If you have a website with a great deal of content, image size could likely be one of the factors behind your site’s slow speed. Hence, it is...

View Full Post
How to Make a Responsive Website in 2024 (No Coding)

How to Make a Responsive Website in 2024 (No Coding)

Posted on November 9, 2024 in WordPress

Is your website not performing well on mobile devices? Poor layout or slow loading times can cause users to leave your site before they even engage with your content. In today’s mobile-first world, a responsive website is no longer just an option—it’s a necessity. Whether you’re...

View Full Post

6 Comments

  1. Great Blog! It was very informative. I have just started my blog here on WordPress and this will definitely help me in the future, so I’m just bookmarking it.

  2. Thanks for detailed explanations. Glad to know that i can manage my site better with new knowledge i got from this contents.

  3. I am facing the same issue , i am unable to login through my wordpress credentials, must be some error. Thanks for the post ill definitely use the recovery mode now to gain back access.

  4. Great Blog! It was very informative. I have just started my blog here on WordPress and this will definitely help me in the future, so I’m just bookmarking it.

  5. Wow! I didn’t seem to notice this feature before, you really helped me a lot and made it more convenient for me to create in the future

  6. Informative article on wordpress recovery mode. Thanks!

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Get Started With Divi