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

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 create a circle that follows a cursor using JavaScript and CSS?CSSrandom function in SCSS (Sass)SCSSSorting Object Arrays in JavaScriptJavaScriptHow to make HTML form interactive and using CSS?CSSHow to reference an aliased column in the WHERE clause?SQL/MySQLSome EASY-to-Understand CSS media query examplesCSSThe :last-of-type selectorCSSThe 7 Security Objectives of Any Organization for IT and Network SecurityMiscellaneousJavaScript Input Validation Theme Park Example using throw StatementJavaScriptSocial Media Colors: LESS VariablesMiscellaneousQuick Introduction to 11 Array Iteration Methods in JavaScriptJavaScriptUnderstand Inheritance in PHP in this Basic Example (For Beginners)PHP