WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp maintenance

Contents

Description

Dies with a maintenance message when conditions are met.

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 enters maintenance mode and displays a message.

The default message can be replaced by using a drop-in (maintenance.php in the wp-content directory).

Usage

<?php wp_maintenance(  ); ?>

Change Log

Since: 3.0

Source File

wp_maintenance() is located in wp-includes/load.php