Title: wp_is_recovery_mode
Published: May 7, 2019
Last modified: August 20, 2026

---

# wp_is_recovery_mode(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#user-contributed-notes)

Determines whether WordPress is in Recovery Mode.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#description)󠁿

In this mode, plugins or themes that cause WSODs will be paused.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#return)󠁿

 bool

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#source)󠁿

    ```php
    function wp_is_recovery_mode() {
    	return wp_recovery_mode()->is_active();
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/load.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/load.php#L1167)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/load.php#L1167-L1169)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Recovery_Mode::is_active()](https://developer.wordpress.org/reference/classes/wp_recovery_mode/is_active/)`wp-includes/class-wp-recovery-mode.php` |

Checks whether recovery mode is active.

  | 
| [wp_recovery_mode()](https://developer.wordpress.org/reference/functions/wp_recovery_mode/)`wp-includes/error-protection.php` |

Access the WordPress Recovery Mode instance.

  |

| Used by | Description | 
| [WP_Fatal_Error_Handler::display_default_error_template()](https://developer.wordpress.org/reference/classes/wp_fatal_error_handler/display_default_error_template/)`wp-includes/class-wp-fatal-error-handler.php` |

Displays the default PHP error template.

  | 
| [wp_admin_bar_recovery_mode_menu()](https://developer.wordpress.org/reference/functions/wp_admin_bar_recovery_mode_menu/)`wp-includes/admin-bar.php` |

Adds a link to exit recovery mode when Recovery Mode is active.

  | 
| [wp_recovery_mode_nag()](https://developer.wordpress.org/reference/functions/wp_recovery_mode_nag/)`wp-admin/includes/update.php` |

Displays a notice when the user is in recovery mode.

  | 
| [wp_get_active_and_valid_themes()](https://developer.wordpress.org/reference/functions/wp_get_active_and_valid_themes/)`wp-includes/load.php` |

Retrieves an array of active and valid themes.

  | 
| [login_header()](https://developer.wordpress.org/reference/functions/login_header/)`wp-login.php` |

Outputs the login page header.

  | 
| [deactivate_plugins()](https://developer.wordpress.org/reference/functions/deactivate_plugins/)`wp-admin/includes/plugin.php` |

Deactivates a single plugin or multiple plugins.

  | 
| [switch_theme()](https://developer.wordpress.org/reference/functions/switch_theme/)`wp-includes/theme.php` |

Switches the theme.

  | 
| [wp_get_active_and_valid_plugins()](https://developer.wordpress.org/reference/functions/wp_get_active_and_valid_plugins/)`wp-includes/load.php` |

Retrieves an array of active and valid plugin files.

  |

[Show 3 more](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.2.0](https://developer.wordpress.org/reference/since/5.2.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/?output_format=md#comment-content-3390)
 2.   [BlackSwanDev](https://profiles.wordpress.org/blackswanlab/)  [  7 years ago  ](https://developer.wordpress.org/reference/functions/wp_is_recovery_mode/#comment-3390)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_recovery_mode%2F%23comment-3390)
    Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_recovery_mode%2F%23comment-3390)
 4. When debugging, use these can be handful when you want to warn users that site 
    is experiencing some problems !
 5.     ```php
        $err = "Some plugin or theme are causing WSOD, Contact webmaster!";
        	$ok = "No problem !";
        	echo wp_is_recovery_mode() ? "$err" : "$ok";
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_recovery_mode%2F%3Freplytocom%3D3390%23feedback-editor-3390)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_is_recovery_mode%2F)
before being able to contribute a note or feedback.