wp_recovery_mode() WordPress Function

The wp_recovery_mode() function enables recovery mode for a Wordpress site. This function can be used if a site is experiencing problems and needs to be taken offline for maintenance. Recovery mode will display a message to visitors informing them that the site is down for maintenance.

wp_recovery_mode() #

Access the WordPress Recovery Mode instance.


Return

(WP_Recovery_Mode)


Top ↑

Source

File: wp-includes/error-protection.php

function wp_recovery_mode() {
	static $wp_recovery_mode;

	if ( ! $wp_recovery_mode ) {
		$wp_recovery_mode = new WP_Recovery_Mode();
	}

	return $wp_recovery_mode;
}


Top ↑

Changelog

Changelog
VersionDescription
5.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.