wp_is_maintenance_mode
wp_is_maintenance_mode ( No parameters )
Returns:- (bool) True if maintenance mode is enabled, false otherwise.
Defined at: - Introduced in WordPress: 5.5.0
- Deprecated in WordPress: —
Description
Checks if maintenance mode is enabled.Checks for a file in the WordPress root directory named ".maintenance".
This file will contain the variable $upgrading, set to the time the file
was created. If the file was created less than 10 minutes ago, WordPress
is in maintenance mode.