Put WordPress in Maintenance Mode

Table of Contents

To put WordPress in maintenance mode temporarily when you undergo a major update or change, you can try the following:

Plugin #

We won’t go into depth here – it’s pretty self-explanatory. Simply choose one of the many maintenance mode plugins and activate it and configure it as you’d like.

.Maintenance File #

For a temporary, short term solution, you can create a file in the root directory of the WordPress install named “.maintenance” and put the following contents in it:

<?php $upgrading = time();
 ?>

Save the file, and if you access your WordPress site, it will display a maintenance message. To deactivate it, simply delete the file.