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 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
Simple Page Hit Counter in PHPPHPWhat are Stored Procedures for SQL Server?SQL/MySQLHow to add before after image effect using pure CSS?CSSCheck if any column has NULL values in PostgresPostgresThe basics of CSS Box modelCSSHow to add Date and Time picker in HTML and get the values using JavaScript?HTMLIN Operator in PostgreSQLPostgresClean Form Input With These PHP Functions Before Inserting into DatabasePHPAvoid using new Array() in JavaScriptJavaScriptWhat are Null Sessions?MiscellaneousSQL ANY OperatorSQL/MySQLThe Types of DatabasesMiscellaneous