Updates are an inevitable part of the WordPress experience, but they don’t have to disrupt your workflow. 

Whether you’re an agency owner, freelance developer, or entrepreneur managing your own site, learning how to use WordPress maintenance mode to your advantage can help you tackle those updates with minimum disruptions.

In this guide, we’ll:

  • Walk you through the quickest and easiest ways to enable and disable maintenance mode.
  • Highlight the top plugins for creating branded maintenance pages, and; 
  • Share tips to ensure your updates have the least impact on your clients’ business and their customers’ user experience. 

What is WordPress Maintenance Mode?

Built into the core WordPress platform, maintenance mode replaces your usual website with a message that informs visitors that the site is unavailable. 

This allows you to carry out vital updates and other behind-the-scenes website maintenance without users stumbling across broken, dysfunctional, or simply incomplete websites. 

When you’re done making and testing your changes, disabling this mode will remove the message so that visitors can once again access your live site. 

Why is this useful? Here are just two of many reasons: 

1. Keep Clients and Their Customers Happy

Can you imagine what would happen if a visitor landed on your site, ready to make a purchase, only to find that the shopping cart isn’t active because you’re currently working on installing a new one? 

The frustrated user doesn’t complete that purchase, nor do they bother returning to make future purchases because they’ve been turned off by that negative experience. 

That means not just the loss of one sale, but potentially many sales. 

Of course, this is bad enough if it’s your own store, but what if it’s a site you’re managing on behalf of a client?

It’s not impossible to imagine that said client might find a different WordPress developer to outsource their maintenance to. What’s more, once word gets around, the blow to your reputation could be enough to steer other potential clients away too. 

Maintenance mode helps you to avoid all this. 

Used correctly with a well-designed maintenance page that lets visitors know what’s going on and directs them to other aspects of a company’s digital presence, it can ensure that the site continues to serve the business’s needs even when it’s technically ‘offline.’

2. Avoid a Knock on Your SEO Efforts

Updates can sometimes lead to certain pages or content being moved or deleted, resulting in broken links and 404 errors

Google’s search crawlers don’t look kindly on such errors, taking them as a sign that your site is of poor quality. 

Here’s where maintenance mode comes in. 

When a visitor tries to access your site while it’s in maintenance mode, WordPress returns a 503 Service Unavailable HTTP status code.

This code communicates to Google that you’re carrying out maintenance tasks. It’s not that the content isn’t there, it’s just that it’s not there right now.

A 503 error tells Google to come back and recheck the page later, hopefully once your live site is restored.

How to Enable WordPress Maintenance Mode

Using WordPress Core:

Have you ever tried accessing your live website while updates are being installed? 

If so, you’ll already know that updates trigger WordPress to automatically enable maintenance mode, replacing your website with a basic message like the one below:

wp-maintenance-core-message

However, what you may not know is that you can trigger this maintenance message at any time simply by adding a few lines of code to your Theme Functions file. 

Here’s how it works: 

1. Access Your Theme Functions File 

First, navigate to Appearance – Theme File Editor – Functions.php.

wp maintenance core theme functions

Copy the entire code in this file and save it to a text file as a backup. 

That way, if you make a mistake, you can paste the backup code back into the file editor to avoid any negative impact on your site. 

2. Add wp_maintenance_mode Code

Next, take the following code snippet and paste it in the bottom of your functions.php file:

// Activate WordPress Maintenance Mode

function wp_maintenance_mode() {
    if (!current_user_can('edit_themes') || !is_user_logged_in()) {
        wp_die('<h1 style="color:black;">Our site is currently under maintenance</h1><br />We apologize for any inconvenience. Please check back soon.');
    }
}
add_action('get_header', 'wp_maintenance_mode');

Note that you can change your ‘Coming Soon’ message by editing the two sections of the code highlighted in the image below:

wp-maintenance-core-add-code

When you’re done with all that, click Update.

Now, when a user without admin access to your site visits the live version, they’ll see a maintenance mode  message like this one:

wp-maintenance-core-new-message

Using Plugins:

Editing the functions.php is a simple solution to activating maintenance mode without the need to add yet another plugin. Yet if you’re not 100% confident in your coding capabilities, nobody could blame you for wanting to avoid those backend .php files as much as possible. 

What’s more, the end result isn’t exactly attractive, is it?

A basic maintenance message does nothing to appeal to your visitors, nor does it allow you to present your branding and direct visitors to other aspects of your online presence. 

So, if that’s important to you, or you simply don’t want to tempt fate with the functions.php file, you may want to use one of the following free plugins instead. 

SeedProd 

SeedProd is a leading WordPress landing page builder with a built-in Maintenance mode option. 

You can use both the free and paid versions of this plugin to not only set WordPress to maintenance mode, but display an attractive and functional page.

Here’s how: 

1. Enter Maintenance Mode Settings

wp-maintenance-plugins-seedprod-1

With Seedprod installed and activated, go to Seedprod – Landing Pages and click on Set up a Maintenance Mode page,

2. Choose a Template

On the next screen, select a page template. 

wp-maintenance-plugins-seedprod-2

Here, you’ll find ready-made options for both ‘maintenance mode’ and ‘coming soon’ pages.

3. Customize Your Template 

Selecting a template opens it in the SeedProd landing page editor, which you can use to customize every aspect of your design.

wp-maintenance-plugins-seedprod-3

For example, you can: 

  • Add your own logo
  • Replace the background image
  • Add other images and video
  • Add and edit text
  • Add buttons
  • Include custom HTML snippets
  • Incorporate payment buttons connected to your Stripe account
  • Integrate with RafflePress to include a giveaway 

Those of you paying for the SeedProd Pro plan can also utilize: 

  • Social media icons
  • WooCommerce features
  • Progress bars
  • Video popups
  • Animated headlines
  • Pricing tables.

Plus a whole lot more additional features

4. Switch to Publish Status

wp-maintenance-plugins-seedprod-4

Once you’re happy with your design, navigate to Page Settings in the SeedProd editor, switch the page status to publish, and click Save

5. Activate Maintenance Mode 

wp-maintenance-plugins-seedprod-5

Finally,  you can exit the page builder by tapping the X in the top right corner. This will present a pop-up, warning you that Maintenance Mode isn’t currently active on your site. 

wp-maintenance-plugins-seedprod-6

Click the Yes, Activate button, and voilà, you’ve now enabled maintenance mode and launched a useful holding page that keeps users engaged with your brand. 

WP Maintenance

With over a million active installations, WP Maintenance earns its reputation as the go-to maintenance mode tool for so many WordPress users thanks to its combination of beginner-friendly simplicity and advanced features. 

Here’s how you can use it to put WordPress in maintenance mode at the click of a button. 

1. Activate WP Maintenance

With the plugin installed and activated, navigate to your WordPress dashboard. 

Here, you’ll see that maintenance mode is already active by default. 

If you prefer, you can deactivate it using the large toggle button on the WP Maintenance dashboard. 

2. Configure Your Content 

Next, scroll down to add the content elements of your holding page, including: 

  • Page title 
  • Meta description
  • Page heading
  • Description
  • Footer text. 

WP Maintenance Pro users can also add contact forms, maps, and other useful features. 

3. Design and Customize Your Page 

Elsewhere, the plugin also allows you to: 

Change the Design

Paid users can choose from pre-made templates, while free users can add logos, change the background image, and customize font and color choices. 

Configure Access Settings

Available on the Pro plan only, WP Maintenance Mode offers options to customize which users can bypass the maintenance page. 

This might be a useful feature for allowing your clients to view your work-in-progress or sign off on the finished project before it goes live. 

These options include: 

  • Send a secret link
  • Password protect the page
  • Customize which pages are hidden behind the maintenance page and which aren’t. 

Set Up Analytics Tools 

If you’re setting up a maintenance page with a particular conversion goal such as newsletter sign-ups,  you can connect to Google Analytics or add other third-party tracking pixels to monitor activity on the page. 

Hostinger Tools 

wp-maintenance-plugins-hostinger

Those of you hosting your website with Hostinger can enable maintenance mode in a single click with the company’s free Hostinger Tools plugin. 

wp-maintenance-plugins-hostinger2

Once enabled, visitors to your site simply see the default Hostinger Coming Soon page. It’s certainly not fancy, and it can’t be customized to reflect your brand, but if that’s not a priority and you’re already an existing Hostinger customer, this is certainly a quick and easy solution to enable maintenance mode in WordPress.

Using Your Page Builder 

If you’re using a WordPress page builder to create your client’s websites, a third alternative is to enable maintenance mode via that tool’s in-built settings.

wp-maintenance-pagebuilder-spectra

In the Spectra Page Builder, for example, simply navigate to Site Visibility and toggle Enable Maintenance Mode into the on position. 

In Elementor, go to Tools – Maintenance Mode.

wp-maintenance-pagebuilder-elementor

Here, you can choose between a Coming Soon or maintenance page, choose from a limited number of access control features, and create a custom template for your page. 

When you’re done, be sure to hit Save Changes to activate maintenance mode. 

How to Disable WordPress Maintenance Mode

When clients are happy with your work and ready for their site to go live again, you’ll find that disabling WordPress maintenance mode is simply a matter of reversing whatever method you used to activate it in the first place. 

Via the Theme Functions File 

If you chose to add the wp_maintenance_mode function to your functions.php file, just return to that file, delete the relevant code, and hit save. 

This will take your site out of maintenance and visitors will once again be able to access the full live site.


Don’t forget to create a backup of your functions.php code first so that you can quickly correct course should something go awry during this process. 

Via Plugins:

To disable WordPress maintenance mode via a plugin, simply open up that plugin and toggle the relevant option into the off position.

wp-maintenance-disable-seedprod

In SeedProd, for example, go back to SeedProd – Landing Pages. If the Maintenance Mode toggle is set to Active, clicking it on it will deactivate it. 

Troubleshooting WordPress Maintenance Mode

Turning maintenance mode on and off may be a straightforward process, but that doesn’t mean things don’t occasionally go wrong. 

If you find your site is stuck in maintenance mode, try the following troubleshooting tips: 

1. Check For In-Progress Updates 


Remember, WordPress will automatically activate maintenance mode when updates are in progress. This is true of the core files, but it also occurs in instances where you have multiple plugins or themes updating at the same time. 


So, if your site seems to be displaying the default maintenance message, your first port of call should be checking your updates page. 

If new updates are installed, wait until they’ve finished and refresh your live site. The WordPress core will automatically deactivate maintenance mode when it’s finished, which means your site should be back to normal once all updates are installed. 

2. Refresh the Browser Cache 

So, you’ve launched a new website project but clients are complaining they still only see the maintenance page.

This could simply be a case of clearing out the browser cache. Browsers such as Chrome, Firefox, and Edge will store copies of website files (like images, CSS, and HTML) locally to speed up page loading times. Sometimes, these cached versions can be outdated, and clearing the cache forces the browser to fetch the latest version of the website from the server

wp-maintenance-chrome-caching1

To do this in Google Chrome, advise clients to click on the three-dot menu icon at the top of their browser and go to Delete browser data.

wp-maintenance-chrome-caching2

Ensure that Cached images and files is selected, and click Delete data

wp-maintenance-chrome-firefox

In Mozilla Firefox, this option can be accessed by clicking the hamburger menu and going to Privacy & Security – Cookies and Site Data

wp-maintenance-chrome-edge

In Microsoft Edge, go to Settings – Cookies and site permissions – manage and delete cookies and site data.

If a browser caching issue is at play here, completing this process then refreshing the page should display the correct version of the website.

3. Delete Server-Side Caching

Another common cause of getting stuck in WordPress maintenance mode is server-side caching issues. 

In other words, if you’re using a WordPress caching plugin such as LiteSpeed Cache to improve website performance, it may be serving visitors an out-of-date version of the page. 

Say your client visits their site and gets the maintenance page. LiteSpeed and other caching plugins will create a static HTML version of the page and serve that to reduce load speeds. 

The problem occurs when they continue to be served on this page even when you’re done with maintenance mode. 

To solve this problem: 

wp-maintenance-site-cache

Open up your WordPress caching tool and purge the cache. Then, ask your clients to revisit the site and refresh the page. 

If that still doesn’t solve the problem, there is another option: 

4. Delete the .Maintenance File 

When you activate maintenance mode, WordPress generates a temporary file called .maintenance which is stored on your server, typically in the public_HTML folder. 

When maintenance mode is deactivated, this file is normally deleted automatically, but there are occasions when it isn’t.

One of the most common causes of WordPress being stuck in maintenance mode is that the .maintenance file still thinks there are updates taking place, thus remaining on your server. 

You can remove this file manually by following these steps: 

wp-maintenance-public-html

1. Open Your File Manager or FTP Client 

2. Navigate to the public_html folder

3. The .maintenance file is a hidden file, so if you don’t see it immediately, ensure hidden files are shown. 

4. Find the .maintenance file 

5. Delete the file and refresh your site. 

wp-maintenance-delete

If you’ve done this correctly, you should now find that the site no longer displays a maintenance message. 

Best Practices for Using WordPress Maintenance Mode

Now that we’ve covered the technical aspects of maintenance mode, it’s time to look at some of the practical steps you’ll want to take to minimize disruptions to yours or your client’s business. 

Before flicking that activate switch, consider: 

Timing For Minimal Impact 

The longer a WordPress site is in maintenance mode, the longer you’re losing out on leads, conversions, or otherwise achieving whatever goal you had in mind for your site. 

To keep these losses to a minimum, consider carrying out maintenance at a time when the site typically experiences its lowest levels of traffic. 

You don’t have to take a stab in the dark here. 

If you’re using Google Analytics, go to Explore – Add New Exploration.

wp-maintenance-analytics

Select Hour as a dimension and drag it into the Rows box. Then add whatever metrics are most relevant to you (in this example, we’ve used Sessions and Active Users) into the values box. 

You’ll start to see a clear picture of when your site is least used. Those off-peak hours are the perfect time for activating maintenance mode without a major impact on business goals. 

Customize the Page for Brand Consistency 

The default WordPress maintenance message can be off-putting, if not confusing, for the average visitor. It creates the impression that the website is somehow broken, with no information on when it may be back online. More importantly, it does nothing to help your agency or your client’s business to grow. 

The solution to this is to create a custom maintenance page using a landing page builder such as SeedProd. 

Be sure to: 

  • Include your logo 
  • Stick to your regular branding in terms of colors, fonts, etc
  • Communicate clearly – explaining that you’re working on the site and providing an estimated timeframe of when you expect to be back online 
  • Include contact information for customers who may need to access the site and/or its services urgency
  • Add social media links – Visitors can still engage with the brand via socials while the main website is down
  • Consider how your maintenance page can be used to achieve business goals, such as by adding a newsletter sign-up form. 

Give Customers a Heads Up 

You can further minimize the impact on day-to-day business simply by letting regular customers know in advance that they won’t be able to access your site. 

Utilize email lists to reach out to your audience, communicating when the downtime will occur, how long for, and when the site will be back online. 

Test and Test Again 

Even the most careful of developers occasionally miss out on glaring errors, especially when under pressure to get the site back online ASAP. 

With that in mind, remember to test everything before you go deactivating maintenance mode. 

Look at: 

  • Navigation
  • Functionality
  • Browser and device compatibility
  • Layout and styling. 

Are you confident that every last detail is just as it should be? 

Are you certain there aren’t any pending updates or processes that could cause the site to get stuck in maintenance mode? 

If so, go ahead: Toggle that switch and get that site live again.

Alternatives to WordPress Maintenance Mode

Even with all these proactive steps in place, you may want to avoid going into maintenance mode altogether. 

That could be at the request of a client who insists on keeping their site active during updates, or it could simply be a professional courtesy. After all, successfully carrying out essential WordPress maintenance without blocking visitors’ access to your clients’ websites can only enhance your reputation.

Whatever the case may be for you, here are two alternatives to WordPress maintenance mode you may want to consider: 

1. Staging Environments

A staging environment is a controlled server environment running an unpublished duplicate copy of your live website. 

This duplicate can be used to install updates, tackle maintenance tasks, or experiment with new features. 

When you’re done making these changes, you can push them to your live site through a website migration. 

Learn how to do this easy way with our top seven plugins to clone WordPress sites.

2. Rolling Updates

Rolling updates, also known as rolling release, is a process through which updates are rolled out gradually to subsets of users rather than to all users all at once.

In WordPress, you can use a PHP variable called Feature Flags to limit the visibility of new features to specific groups of users.

For example, say you’re working on a new design for a client. You want the client to be able to view your progress and provide feedback without rolling the new design out to all visitors. 

You could edit  your functions.php file with the following code:

define(‘NEW_DESIGN_ENABLED’, true); // Replace ‘true’ with ‘false’ to hide the new design

This would ensure that while the new design can be seen by the client, their users will still see the old design until you get the OK to go live. 

How to Use WordPress Maintenance Mode: Key Takeaways

By taking the time to read this guide, you’ve armed yourself with the techniques and tools needed to enable WordPress maintenance mode when working on those vital behind-the-scenes updates. 

For example, you now know:

  • The two most effective ways to enable and disable maintenance mode – Either by editing your functions.php file or using a plugin such as SeedProd or WP Maintenance.
     
  • How to troubleshoot a WordPress site stuck in maintenance mode – Remember to check for in-progress updates, clear caches, and ensure the .maintenance file has been deleted. 
  • How to minimize downtime while in maintenance mode – Timing is everything. So is proactive communication and effective branding. 

Of course, if you’d rather hand over all that hard work to somebody else, we’re here to help. Our WordPress Care and Maintenance plans offer an affordable, white-label solution for WordPress agencies and freelance developers alike.