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_DISABLE_FATAL_ERROR_HANDLER', true );
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
Select statement in Postgres with examplesPostgresThe SQL UNION OperatorSQL/MySQL4 ways to create Date Objects in JavaScriptJavaScriptSQL GROUP BY StatementSQL/MySQLclip and clip-path properties in CSSCSSHow to apply style to a specific child element using CSS?CSSIs there a way to do a FULL OUTER JOIN in MySQL?SQL/MySQLSolution to pod install fails with json error on Mac OS X 10.15 (or Mac OS Catalina)MiscellaneousHow to create a simple digital clock using JavaScript?JavaScriptWhat is XP (Extreme Programming) and When should it be used?MiscellaneousHow to Commit and Rollback Changes in SQL?SQL/MySQLCustom Post Type Template Files in WordPressWordPress