WordPress Main­te­nance Mode lets visitors know that your website is tem­porar­i­ly un­avail­able. It is enabled au­to­mat­i­cal­ly during updates, can be activated manually using a system file or PHP, or easily set up and cus­tomized with a WordPress main­te­nance mode plugin.

Key Takeaways

WordPress Main­te­nance Mode shows visitors a notice while your website is tem­porar­i­ly un­avail­able.

  • WordPress activates Main­te­nance Mode au­to­mat­i­cal­ly when it updates itself, plugins or themes.
  • Without a plugin, you can enable it manually by creating a .maintenance file in the root directory.
  • Plugins such as Main­te­nance or SeedProd let you set up a cus­tomized main­te­nance page.
  • Business websites must keep legally required in­for­ma­tion ac­ces­si­ble during main­te­nance.
  • If your website gets stuck in Main­te­nance Mode, delete the .maintenance file via FTP or your hosting provider’s file manager.
$1 Domain Names – Register yours today!
  • Great premium TLDs at af­ford­able prices
  • Simple reg­is­tra­tion & transfer

What is WordPress Main­te­nance Mode?

To keep your website tech­ni­cal­ly up to date, WordPress, plugins and themes need to be updated regularly. During these updates, WordPress au­to­mat­i­cal­ly activates a temporary main­te­nance mode. For a short time, the website may be only partially ac­ces­si­ble and visitors will see a notice ex­plain­ing that main­te­nance is in progress.

For planned main­te­nance or more extensive changes, WordPress Main­te­nance Mode can also be enabled for longer periods, for example with a WordPress main­te­nance mode plugin or a custom main­te­nance page. This prevents visitors from seeing in­com­plete or faulty content and instead makes it clear that the website is only tem­porar­i­ly un­avail­able.

How do I activate WordPress Main­te­nance Mode?

WordPress has included a built-in Main­te­nance Mode since version 3.0. It is activated au­to­mat­i­cal­ly whenever WordPress itself, a plugin or a theme is updated. During this process, WordPress briefly creates a .maintenance file in the root directory and displays a simple notice to visitors.

You can customize this page without using a plugin. To do so, create a file called maintenance.php in the wp-content/ directory. Whenever Main­te­nance Mode is active, WordPress au­to­mat­i­cal­ly loads this file and displays its contents instead of the default message. This allows you to create a custom main­te­nance page. Automatic Main­te­nance Mode usually remains active only while an update is being carried out, typically for just a few seconds.

If you activate WordPress Main­te­nance Mode manually, however, you have much more control. You can decide when the website goes offline and how long the main­te­nance period lasts. There are two main ways to enable it manually: you can work directly with PHP or system files, or use a WordPress main­te­nance mode plugin to simplify the process.

Ac­ti­vat­ing WordPress Main­te­nance Mode without a plugin

To activate WordPress Main­te­nance Mode manually without a plugin, you can create a file in the WordPress root directory. Create a file named .maintenance (including the dot at the beginning) and add the following code:

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

Manually activated WordPress Main­te­nance Mode affects not only the frontend but can also block access to wp-admin. Before ac­ti­vat­ing it, make sure you can access the root directory of your WordPress in­stal­la­tion via FTP/SFTP or your hosting provider’s file manager.

As soon as the file is in place, WordPress puts the website into Main­te­nance Mode. Because time() is re­cal­cu­lat­ed each time a page is requested, this manual version remains active until you delete the .maintenance file. This method is therefore suitable when you want to decide for yourself when Main­te­nance Mode ends.

WordPress compares the timestamp stored in $upgrading with the current time. If a fixed timestamp is more than 10 minutes old, WordPress au­to­mat­i­cal­ly ends Main­te­nance Mode. The .maintenance file is therefore primarily suited to short update processes. For longer main­te­nance periods or cus­tomized main­te­nance pages, plugins are a better option.

Note

Once you have finished your work, you need to delete the .maintenance file manually to make your website ac­ces­si­ble again. Tech­ni­cal­ly, this method uses the same mechanism that WordPress activates au­to­mat­i­cal­ly during updates, but it does not provide any options for cus­tomiz­ing the page displayed to visitors.

Ac­ti­vat­ing WordPress Main­te­nance Mode with a plugin

If you want to manage WordPress Main­te­nance Mode more con­ve­nient­ly and customize the page shown to visitors, using a plugin is a good option. Two widely used solutions are Main­te­nance and SeedProd.

Main­te­nance offers a cus­tomiz­able page for visitors to see while your website is in Main­te­nance Mode. You can change every­thing from the logo and text to the colours and back­ground. Pre-built design templates are available in the plugin’s Pro version. You can also exclude in­di­vid­ual pages from Main­te­nance Mode, among other options.

Image: Maintenance page from Maintenance
Example WordPress Main­te­nance Mode screen; created with Main­te­nance

SeedProd also provides a con­ve­nient and pro­fes­sion­al way to set up WordPress Main­te­nance Mode. The plugin includes a visual drag-and-drop editor that lets you create custom main­te­nance pages without any coding knowledge. You can choose from a wide range of pre-built templates and customize them to suit your website. SeedProd also uses a 503 status code in Main­te­nance Mode, sig­nalling to search engines that the site is only tem­porar­i­ly un­avail­able. Another useful feature is the option to exclude specific pages from Main­te­nance Mode, allowing selected content to remain ac­ces­si­ble.

Image: Maintenance page from SeedProd
Example WordPress Main­te­nance Mode screen; created with SeedProd

What should you consider when using WordPress Main­te­nance Mode?

If you run a business website, keep in mind that WordPress Main­te­nance Mode does not remove any legal dis­clo­sure re­quire­ments that apply to your website. Depending on your business, your province or territory and your ac­tiv­i­ties, certain business, contact or consumer in­for­ma­tion may still need to remain ac­ces­si­ble while the site is un­der­go­ing main­te­nance.

The same applies to privacy in­for­ma­tion. If the main­te­nance page collects personal in­for­ma­tion, for example through analytics tools, cookies, tracking tech­nolo­gies or contact forms, ap­plic­a­ble federal or provin­cial privacy laws may require you to provide certain notices or obtain consent. You should therefore make sure that any required privacy in­for­ma­tion remains ac­ces­si­ble while WordPress Main­te­nance Mode is active.

Re­gard­less of the legal re­quire­ments, it is also advisable to give visitors a way to contact you, for example by providing an email address or contact form. This allows them to get in touch directly if they have any questions about the main­te­nance work or downtime.

What problems can occur with WordPress Main­te­nance Mode?

When WordPress Main­te­nance Mode is activated, WordPress creates a temporary .maintenance file in the root directory. You can also create this file manually, as described above. Once the main­te­nance work has been completed and Main­te­nance Mode ends, WordPress normally deletes the file au­to­mat­i­cal­ly. However, the file may oc­ca­sion­al­ly remain in place, for example if an update fails because of an error, server timeout or plugin conflict. As a result, the website can remain stuck in Main­te­nance Mode.

You can usually resolve this by deleting the .maintenance file manually. To do so, you need access to your web project via FTP (File Transfer Protocol) or your hosting provider’s file manager.

To delete the .maintenance file manually, follow these steps:

  1. Access the web server using an FTP program such as FileZilla or your hosting provider’s file manager.
  2. Navigate to the root directory of your WordPress in­stal­la­tion.
  3. Delete the .maintenance file.
  4. If necessary, clear the cache and reload the website.

If the problem persists, contact your web hosting provider for further as­sis­tance.

Reviewers

Go to Main Menu