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 check if radio button is checked or not using JavaScript? #2 How to add Read More Read Less Button using JavaScript? #3 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #4 How to uninstall Cocoapods from the Mac OS? #5 PHP Login System using PDO Part 1: Create User Registration Page #6 How to Use SQL MAX() Function with Dates?

Recently Posted

#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 #Jan 14 How to display a student’s individual transcript in Colleague? #Jan 11 How to install PuTTY on a MacOS?
You might also like these
How to check if the page is single post page in WordPress?WordPressSolution to “Call to undefined function mysql_error()” in RevSlider WordPress PluginWordPressHow to Make a Simple Module with a Form and Menu Link in Drupal 7.x?DrupalAccessing and Setting features of JavaScript ObjectsJavaScriptHAVING Clause in Postgres with Examples in All Aggregate FunctionsPostgresArray destructuring and Object destructuring in JavaScriptJavaScriptTwo ways we can use colon(:) in Envision BasicEnvision BasicFor In Loop in Swift for BeginnersSwiftHow to draw an SVG path on scroll using JavaScript?JavaScriptHow to check if a link has http or https in it in JavaScript?JavaScriptCrypto.getRandomValues() method in JavaScriptJavaScriptComposing and Extracting Components in ReactReact