How to Put Your WordPress Website Into Maintenance Mode (3 Methods)

How to Put Your WordPress Website Into Maintenance Mode (3 Methods)

As a website owner, there will likely be times when you need to shut your website down temporarily. Perhaps you have some updates to perform or plugins to test before pushing your site live. Whatever the reason, it’s essential to know how to turn on WordPress maintenance mode.

Fortunately, there are multiple ways to go about it. The best one to use will depend on a handful of factors. This includes your experience with editing code, your willingness to install a new plugin, and whether you’re dealing with more than one site. In any case, there’s a quick and easy solution.

In this post, we’ll explain what maintenance mode is and why it’s important. Then we’ll provide you with three methods you can use to put your WordPress website into maintenance mode. Let’s get started!

An overview of WordPress maintenance mode

If you’re going to perform a major update on your live WordPress site, it’s going to be unavailable while you do so. Although not always necessary, it’s usually best to let your audience know what’s going on to avoid looking unreliable or unprofessional.

That’s where WordPress maintenance mode comes in. Essentially, it’s a status that you can set your site to so others know that work is being done and your content will be temporarily inaccessible. With maintenance mode turned on, users will see a page telling them that the site is currently undergoing construction rather than a broken page.

This way, your users know the site is unavailable for a legitimate reason. The splash page can also let them know when they can expect your content to be back.

Some common examples of situations in which you might want to use WordPress maintenance mode include:

  • Fixing issues with your website or patching a security vulnerability
  • Changing your WordPress theme
  • Testing to make sure plugins work
  • Installing or setting up new services
  • Performing miscellaneous updates

It’s worth noting that you don’t necessarily need to enable maintenance mode any time you want to make a change to your site. For example, if you plan to fix a minor bug or update a plugin or two, it shouldn’t cause any major interruptions or downtime (especially if you have a simple site). However, the size and complexity of your website can also influence how long maintenance tasks take.

How to put your WordPress website into maintenance mode (3 methods)

Now that you understand why you might need maintenance mode, let’s look at how you can use it. Below, we’ll discuss three methods available for implementing it.

1. Edit your functions.php file

WordPress uses the wp_maintenance function to create a .maintenance file, which displays the default maintenance message on your site’s front end. It says that your site is “Briefly unavailable for scheduled maintenance. Check back in a minute”:

This page displays when your site is undergoing maintenance without you actually having to turn it on. However, it’s not the most personable or aesthetically pleasing page.

Fortunately, you can both manually turn on WordPress maintenance mode and customize the message to your liking. One method of doing so is editing your site’s functions.php file.

Note that you should only use this method if you’re comfortable working with code and are familiar with editing your site’s files. Otherwise, you might want to try one of the other solutions below. Also, before proceeding, remember to make a backup of your site – just in case.

Once this is done, you can navigate to the file manager of your WordPress hosting account and paste the following code at the bottom of your current theme’s functions.php file:

// Activate WordPress Maintenance Mode
function wp_maintenance_mode() {
if (!current_user_can('edit_themes') || !is_user_logged_in()) {
wp_die('<h1>Under Maintenance</h1><br />Website under planned maintenance. Please check back later.');
}
}
add_action('get_header', 'wp_maintenance_mode');

You can change the fourth line to whatever you want the maintenance mode message to say. When you’re done, save the file. After you’re finished working on your site, remember to delete this code to take your site out of maintenance mode.

2. Install a WordPress maintenance mode plugin

Another option you have for putting your site into maintenance mode is to use a plugin. This method is beginner-friendly and offers a lot more flexibility and customization options than editing functions.php.

There are a handful of plugins to choose from. One of the most popular is Coming Soon Page and Maintenance Mode by SeedProd:
The WordPress maintenance mode plugin by SeedProd.
This premium tool provides a plethora of benefits. In addition to using it to quickly enable maintenance mode, you can also build beautiful Coming Soon and landing pages with it. It’s intuitive, easy to use, and includes a drag-and-drop builder as well.

To use it to put your site into maintenance mode, you’ll need to purchase a SeedProd Pro license. Once you install and activate the Pro plugin, you can turn on maintenance mode under SeedProd > Settings.

If you’re looking for a free plugin option, you might consider using WP Maintenance Mode:
The WP Maintenance Mode WordPress plugin.
While not as feature-rich as SeedProd, it offers a suite of useful functions and tools to create and enable a visually pleasing maintenance mode page. Once it’s activated on your site, you can use it by navigating to Settings > WP Maintenance Mode:
The WP Maintenance Mode plugin settings.
Next, you can change the Status to Activated to turn on maintenance mode. You can also customize the page settings and permissions from here. When you’re done, click on the Save Settings button at the bottom.

A downside to this method is that it requires you to install a plugin on your site. If you have multiple WordPress installations or want to avoid the risk of slowing your site down, you might consider the final option instead.

3. Use ManageWP’s Maintenance Mode feature

A third method you can use – which is ideal if you have many sites to manage – is our ManageWP Maintenance Mode feature:
The ManageWP Maintenance Mode feature landing page.
If you’re unfamiliar, ManageWP makes it easy to monitor and manage all fo your WordPress sites from a single dashboard. You can maintain unlimited sites from one place and access various free and premium add-ons.

Our free maintenance mode feature provides you with two pre-built templates – Website Under Maintenance and Coming Soon:
The ManageWP Maintenance Mode settings screen.
You can activate the Maintenance Mode pages for individual websites directly from your ManageWP dashboard. Additionally, you can customize which user roles Maintenance Mode is visible to (Administrator, Editor, Author, etc.).

If you’re new to ManageWP, you can sign up for free. Simply enter your email and click on the Sign up button to get started.

Conclusion

When you’re in charge of running and managing a website, performing updates and miscellaneous changes periodically is inevitable. However, if your site will be unavailable while you’re working on it, it’s best to turn on maintenance mode to let your visitors know what’s going on.

In this post, we discussed how to put your WordPress website into maintenance mode using different three methods:

  1. Edit your functions.php file with custom code.
  2. Install a WordPress maintenance mode plugin such as SeedProd.
  3. Use ManageWP’s Maintenance Mode feature.

Do you have any questions about putting WordPress into maintenance mode? Let us know in the comments section below!

Image credit: Pexels.

Keep reading the article at ManageWP. The article was originally written by Will Morris on 2021-03-02 11:00:01.

The article was hand-picked and curated for you by the Editorial Team of WP Archives.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

Show Your ❤️ Love! Like Us
Scroll to Top