Yogesh Chauhan's Blog

How to disable the Recovery Mode in WordPress?

in WordPress on January 1, 2022

Recovery Mode in WordPress

Recovery Mode was introduced in WordPress 5.2 version.

If the Recovery Mode is enabled, it will display an error message rather than a white screen when a plugin causes a fatal error.

PHP error messages and White screens are not displayed to users any more after WordPress 5.2. But there is a way to enable it in a development environment.

We can control disable the fatal error handler and recovery mode using WP_DISABLE_FATAL_ERROR_HANDLER in wp-config.php file.

How to disable the Recovery Mode?

To enable WP_DEBUG_DISPLAY, disable recovery mode by setting WP_DISABLE_FATAL_ERROR_HANDLER constant true.

This is how you can do it in WordPress version before 5.2:

define( 'WP_DEBUG_DISPLAY', true ); 

This is how you can do it in WordPress version 5.2 and later:

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

How to check the Recovery Mode status?

You can check the status for the fatal error handler (Recovery Mode) by using wp_is_fatal_error_handler_enabled() function.

Most Read

#1 Solution to the error “Visual Studio Code can’t be opened because Apple cannot check it for malicious software” #2 How to add Read More Read Less Button using JavaScript? #3 How to check if radio button is checked or not using JavaScript? #4 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

#Apr 8 JSON.stringify() in JavaScript #Apr 7 Middleware in NextJS #Jan 17 4 advanced ways to search Colleague #Jan 16 Colleague UI Basics: The Search Area #Jan 16 Colleague UI Basics: The Context Area #Jan 16 Colleague UI Basics: Accessing the user interface
You might also like these
How to get current timestamp in Swift 4 and 5?SwiftHow to create a link tag button using CSS?CSSThe substr() method in JavaScript and how it’s different from substring()JavaScriptWindow setInterval() Method in JavaScriptJavaScriptWordPress Plugin: Things to knowWordPressHow to apply style to the first-child using jQuery?jQueryHow to get recent posts in WordPress?WordPressIntroduction to Angular modules Part 1: NgModule metadataAngularAdvanced Array Methods in JavaScript (with examples)JavaScriptHow to get the first element with a class name xyz using JavaScript?JavaScriptHow to create a horizontal scrolling menu with and without flex using CSS (or SCSS)?CSSThe * arithmetic operator in Envision BasicEnvision Basic