WordPress Training
WordPress

Enabling & Disabling WordPress Maintenance Mode — the Practical Guide

WordPress-Wartungsseite mit Werkzeug-Symbol auf einem Laptop

You want to install a major update, swap the theme or make a critical plugin change — and at the same time you do not want a visitor to see a half-finished site in the middle of the work. That is exactly what WordPress maintenance mode is for. It sounds simple, and ideally it is — until WordPress suddenly gets stuck in maintenance mode after an update and nobody can get in or out any more. In this article I show you the clean route via a plugin, the code route without a plugin, and the emergency fix when the mode gets stuck.

WordPress maintenance page with a tool icon on a laptop

When do you actually need maintenance mode?

Not for every small update. Standard plugin updates and security patches run fast enough that hardly any visitor notices the gap of a few seconds. Maintenance mode is worthwhile when you:

  • install several plugin updates at once
  • change the theme or take a new layout live
  • migrate or clean up the database (removing post revisions, for example)
  • change hosting provider and do a DNS cutover (more on this in my article Migrating WordPress)
  • swap out larger amounts of content at once (prices or legal texts, for example)

Rule of thumb: if you are working in the back end for more than two or three minutes and at the same time do not want anyone to see an inconsistent front-end version — maintenance mode on.

Method 1: the "WP Maintenance Mode & Coming Soon" plugin

The simplest and at the same time cleanest solution — free, actively maintained, with attractive templates. Alternatives that work similarly well: SeedProd (paid, with a drag-and-drop designer), Maintenance by WebFactory, or LightStart (formerly the original WP Maintenance Mode).

Setup in under two minutes:

  1. Plugins → Add New → search for "WP Maintenance Mode & Coming Soon" → install, activate.
  2. Open it via Settings → WP Maintenance Mode.
  3. Set the status to Activated.
  4. In the Design tab, adjust the headline, text and logo. The default is neutral enough that you can go live without any design work.
  5. In the Modules tab, optionally add a countdown, social icons or a contact form.
  6. Save. Done.

One important point many people overlook: under General → Back-end access, make sure that logged-in administrator and editor accounts still see the normal site. Otherwise you effectively lock yourself out if you are accidentally logged out while wanting to work in parallel.

Maintenance page design in a browser preview window

What do visitors see, and what does Google see?

A well-configured maintenance plugin automatically sends the HTTP status 503 Service Unavailable instead of 200 OK. That matters: Google interprets 503 as "temporarily unavailable" and does not downgrade the page in the search results. If 200 OK were sent instead, you would have the maintenance page as ranking content — and your real content would have disappeared for Google as long as the mode is active.

You can check this with a status code checker (httpstatus.io, for example) or directly in the browser developer tools in the network tab.

Method 2: maintenance mode without a plugin (manual)

If you want to manage without another plugin, you can activate the mode with a few lines of code in the functions.php of your child theme:

function wptraining_maintenance_mode() {
    if ( ! current_user_can( 'edit_themes' ) || ! is_user_logged_in() ) {
        wp_die(
            '<h1>Maintenance work</h1><p>This site is currently being updated. It will be back in a few minutes. Thank you for your patience!</p>',
            'Maintenance work',
            array( 'response' => 503 )
        );
    }
}
add_action( 'get_header', 'wptraining_maintenance_mode' );

To disable it, delete these functions from functions.php again. Important: this variant is very puristic (no design, no image), and you should only build it into the child theme — otherwise the next theme update will overwrite your change.

Do you want to look after WordPress cleanly yourself, without looking things up every time? In my online course you learn the maintenance workflows I have used day to day for over ten years. → To the online course

Disabling maintenance mode — the regular route

Plugin variant: Settings → WP Maintenance Mode → set status to "Deactivated" → Save. Clear the cache if you use a caching plugin such as WP Rocket or LiteSpeed Cache.

Code variant: remove the functions from functions.php, save.

In both cases you are back live within seconds. Ideally check briefly afterwards: open the front page, open a blog post, submit a form. Then you know not only that the mode is gone, but that whatever you changed under it actually works.

Emergency: "Briefly unavailable for scheduled maintenance" — and the site never comes back

A classic WordPress drama. During an automatic update, WordPress creates a hidden file called .maintenance in the root directory of your installation. If the update goes wrong, the file is not deleted — and the site shows all visitors (including you in the back end) nothing but the infamous message "Briefly unavailable for scheduled maintenance. Check back in a minute."

The fix takes less than two minutes:

  1. Go via FTP, SFTP or your host's file manager to the root directory of the WordPress installation (where wp-config.php lives).
  2. Delete the file .maintenance. (It is a hidden file — in FileZilla you therefore enable Server → Force showing hidden files.)
  3. Reload the site in the browser — it is live again.
FTP client showing the .maintenance file in the WordPress root

If the file still is not visible, check these alternatives:

  • Are hidden files enabled? (see above)
  • Right-click → "Show hidden files" in your host's file manager.
  • Was the last update started more than 10 minutes ago? In that case WordPress is actually allowed to delete the file itself — but it does not do so reliably.

Finding the cause: if this happens more often, it is almost always down to a PHP max execution limit that is too short (under 60 seconds) or an overloaded shared hosting server. Moving to a WordPress-specialised host usually solves it for good. More background on choosing a host and on performance in my article WordPress Page Speed 2026.

Security tip: protect the login page from bots

If you are working on the maintenance setup anyway, this is a good moment to harden the login URL as well. The default /wp-admin and /wp-login.php are the most attacked URLs on any WordPress site. How to move them in five minutes is described in Changing the WordPress login URL.

Frequently asked questions

Will I see the maintenance page myself when logged into the admin?
With the plugin, no — logged-in admins see the real site. With the code variant it depends on how you formulate the conditions. In the example above the condition is ! current_user_can('edit_themes'), so only non-editors see the page.

What happens to running cron jobs during maintenance mode?
They keep running. If you do not want that (because you are migrating the database, for example), temporarily disable WP-Cron in wp-config.php with define('DISABLE_WP_CRON', true);.

Is the maintenance page cached?
It should not be if the plugin works correctly. Even so: clear the cache after deactivating (server, CDN, browser).

How long may I leave maintenance mode active?
From Google's side: up to several days without ranking damage, as long as the 503 status is sent cleanly. From the user's side: as briefly as possible. For longer rebuilds (days), it is better to work with a separate "coming soon" page and not take the main site offline at all.

Does this also work with Elementor and Divi pages?
Yes. Maintenance mode sits ahead of theme rendering, so it is independent of whether you work with a page builder or the standard theme.

Conclusion

In 90 % of cases a well-configured maintenance plugin with a correct 503 status is enough. The code variant is clean, but only for people with child theme experience. You should have seen the .maintenance emergency once yourself — then you will never again lose an hour when it happens.

If you want not just to repair WordPress but to understand it systematically, my online course is the right route: there you learn not only maintenance mode but the complete update and security workflow. → To the online course


Image source, featured & inline: illustrations created specifically in the pletzenauer design (no stock photos).

Tags

PluginSicherheitWartungWordPressWorkflow