How to Put Your WordPress Site into Maintenance Mode

Performing updates and maintenance tasks is important to keep your WordPress website secure and running smoothly. Yet when you’re in the process of making changes to your site, you may not want visitors to access it.

Fortunately, putting your website into maintenance mode can help inform visitors that it’s currently under construction and they should come back again soon. This can also prevent them from landing on a broken site or page that isn’t working. 

In this post, we’ll explain what WordPress maintenance mode is and when you should use it. Then we’ll show you three methods for activating it in WordPress. Finally, we’ll teach you how to create a more custom maintenance mode design using a page builder.

What is WordPress maintenance mode?

Essentially, maintenance mode in WordPress is a status update that lets people know you’re currently making major changes to your website. In some cases, it also includes an estimate of when the site will be live again.

WordPress comes with a default maintenance mode page. It includes the text: “Briefly unavailable for scheduled maintenance. Check back in a minute.”

briefly unavailable for scheduled maintenance message

Although this message gets the job done, there are a handful of methods you can use to make it more visually appealing and engaging. A custom maintenance mode page does more than just inform visitors that the site will be temporarily unavailable — it can promote your social media channels, give people a peek behind the scenes, and even let them sign up for your email list so they receive updates. 

Finally, if your site isn’t live yet or is being completely overhauled, another option is to create a ‘coming soon’ page. You can include a countdown to your launch date in order to generate excitement. 

When you should (and shouldn’t) use maintenance mode

It’s important to make a good impression on your visitors, even when your site isn’t currently live. A broken site may make them question your professionalism or credibility. 

Maintenance mode is best to use when you’re implementing significant changes to your website. It’s not necessary when you’re making minor tweaks, like publishing content or updating links. These are quick, easy changes that don’t usually cause any issues or uptime interruptions. 

On the other hand, if you’re making or changing something that affects the site’s functionality, like customizing your theme, it’s best to take it offline until you’re finished. 

Here are some times when it makes sense to use maintenance mode:

  • Running updates to WordPress core, themes, and plugins
  • Developing your site before it’s ready to launch
  • Editing content that you don’t want visible on the front end of your site 
  • Making structural changes to your site, like modifying the navigation
  • Editing your site’s code or core files 
  • Adding new elements to a main page
  • Troubleshooting errors or conflicts on your site
  • Cleaning up damage resulting from a security breach

Instead of an error message, you can control what information your visitors encounter, improving their experience and perception of your site.

How to put WordPress into maintenance mode

Now that you understand what maintenance mode is and when you should use it, let’s take a look at how you can turn it on. Below are three methods for putting your WordPress site into maintenance mode. 

1. Use a plugin like WP Maintenance Mode

The fastest and easiest way to put your WordPress website into maintenance mode is by using a plugin. This is a beginner-friendly choice that eliminates the need to edit your site’s files or work with any code.

There are a handful of dependable options to choose from. One of the most popular is WP Maintenance Mode.

This free plugin is easy to use and requires just a few clicks. You can use the visual customizer to make your page more aesthetically pleasing than the default WordPress maintenance mode page.

To get started, you’ll need to install and activate the WP Maintenance Mode plugin on your website. To do this, navigate to Plugins → Add New, then search for “wp maintenance mode.” Next, click on the Install Now and Activate Plugin buttons.

Once the plugin is activated, you can make your way to Settings → WP Maintenance Mode from your admin dashboard. There, you will find five tabs.

WP Maintenance Mode plugin settings

Under the General section, you can activate maintenance mode. Simply select the Activated setting next to Status. You can also choose to have the maintenance mode bypass search bots, and determine which users will have access to the back end of your site while it’s in maintenance mode.

To customize the appearance of your maintenance mode page, there are several options under the Design tab.

design options for maintenance mode

For example, you can modify the wording of the maintenance mode message that visitors see. You can also change the background color. If you want to add additional features, like a countdown, you can do so under Modules.

module options in the WP Maintenance Mode plugin

There’s also a subscribe feature that you can use to notify visitors when you’re done updating the site. You can even connect the maintenance page to your social media accounts. This way, people will be able to select social media icons to be redirected to your profiles. 

When you’re done, click on Save settings at the bottom of the screen. If Activated is still selected under the General settings, your site will be put into maintenance mode. 

Additional maintenance mode plugins

WP Maintenance Mode is just one plugin option, but there are other tools you might want to consider. Another popular choice is SeedProd.

This freemium solution is an excellent option when you want to create a coming soon or maintenance mode landing page that is bright and inviting. It works with just about any WordPress theme, and it also lets you customize 404 error pages.

Alternatively, if you’re looking for something more simple and straightforward, you might consider the Maintenance plugin.

This tool is more about function and utility than looks. Once installed, you can use it to enable a 503 ‘service temporarily unavailable’ message. It also lets you add your own branding to the page, like your logo and a background image. When you opt for the premium version, you can choose from over 200 pre-made templates. 

You can also design and activate maintenance mode landing pages using page builder plugins, which we’ll discuss later in this post. The exact steps for turning on maintenance mode in WordPress will vary depending on the specific plugin you’re using, but the general process is similar. 

2. Add code to your WordPress theme’s function.php file

Another option for putting your website into maintenance mode is to add code to your theme’s functions.php file. Since this method involves editing one of your site’s core files, you’ll want to proceed with some caution. We’d recommend backing up your website before attempting this.

Once you’ve created your WordPress backup, you can locate and edit this file in a handful of ways. You can go through your hosting provider’s file manager, or connect to your site using a File Transfer Protocol (FTP) client like FileZilla

Alternatively, you can access and modify functions.php directly within WordPress. To do so, simply navigate to your admin dashboard, then go to Appearance → Theme Editor. On the right-hand side of your screen, you’ll see a list of your theme files.

Select Theme Functions. This will open your functions.php file.

editing the functions.php file

Scroll to the end of the file, then copy and paste the following code snippet:

// 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’);

When you’re done, save your changes by selecting Update File at the bottom of the screen. This will automatically activate maintenance mode on your WordPress site.

If you visit the front end of your site, you should see the following:

"Under Maintenance" message on a WordPress site

If you want to change the wording of the message, you can modify the descriptive text in the code you just pasted within the theme’s file. For instance, you may want to include details regarding how long your site will be under maintenance.

3. Edit your WordPress site’s .htaccess file

Another way to put your website into maintenance mode is to edit your .htaccess file. Note once again that it’s important to create a backup of your site before you try this. 

As with the functions.php file, you can find your .htaccess file via FTP or your web host’s file manager. Then, locate your site’s root directory (typically called public_html). Open this folder, then create a new file and title it “maintenance.html.”

finding the maintenance.html file

Within this file, you can add the message that you want to appear on your maintenance page. Then, save your changes.

Next, navigate to your .htaccess file, right-click on it, and select Edit. Copy and paste the following code snippet at the bottom of the file:

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_URI} !^/maintenance\.html$

RewriteRule ^(.*)$ https://example.com/maintenance.html [R=307,L]

Finally, save the file. Now, your visitors will be directed to the maintenance.html page you created. 

How to get your WordPress website out of maintenance mode

When you’re ready to take your site live again, there are multiple ways you can get your website out of maintenance mode. The best approach depends on the method you used to turn it on.

If you used the WP Maintenance Mode plugin, you can navigate to Settings → WP Maintenance Mode → General. Then, click on the Deactivated option.

WP Maintenance Mode plugin deactivated

When you’re done, select Save settings. Your site should now be out of maintenance mode. 

If you activated maintenance mode by adding code to your theme’s functions.php or .htaccess file, you’ll need to remove that code in order to take your site live again. 

You’ll use the same method you used to add the maintenance mode code. For example, if you added it to functions.php via an FTP client, navigate back to your current theme’s folder, and browse to the end of the functions.php file. Delete the snippet and save the file.

If you edited your site’s .htaccess file, you’ll also need to delete the code you added and save the file. In addition, you’ll want to delete the maintenace.html file you created. 

Regardless of the method you use, we recommend that you visit your site on the front end to confirm that it is no longer in maintenance mode. You might have to clear your cache and refresh your browser tab to verify this. 

What to do if WordPress is stuck in maintenance mode

Although putting your site into and out of maintenance mode is a relatively simple process, you might encounter some issues along the way. For instance, it’s possible for your website to get stuck in maintenance mode.

Typically, when this happens, it’s because there’s a conflict that causes the maintenance file to believe that updates are not complete. This can also occur if you navigate away from the screen or refresh the page before an update is finished. 

If you can’t log in to your site and are unable to access the back end, don’t panic. There are some simple steps you can take to troubleshoot and resolve the issue.

First, connect to your site via FTP client or your web host’s file manager. Browse to the root directory of your site, locate the maintenance.html file, right-click on it, and delete it. 

Once you delete the file, refresh your website in a new browser tab. It should return to normal. If you’re still seeing the maintenance mode page, try clearing your browser cache as well. 

Using a page builder to design a custom maintenance mode page

The default maintenance mode page in WordPress can look plain. Fortunately, there are ways you can design your own maintenance mode page to make it more visually appealing.

As we saw with WP Maintenance Mode, you can build a page using a plugin. The downside to using this method is that the customization options can still be somewhat limited. 

If you’re unfamiliar with coding and web development, but want a more custom maintenance page, you can use a page builder plugin like Elementor.

This freemium tool lets you easily create a wide range of content pages for your website. It also includes a maintenance mode option that lets you choose from a library of templates or start from scratch. Plus, you’ll get access to an intuitive drag-and-drop builder that is beginner-friendly.

Creating a maintenance mode template

Now, let’s explore how you can make your own maintenance mode designs with Elementor. First, you’ll need to install and activate the plugin on your WordPress site. 

Then, you can begin creating a maintenance mode template by navigating to Templates → Add New. Under Template type, select Page. Give your template a descriptive name, then select Create Template.

choosing a template with Elementor

This will open the Elementor editor interface. Locate the gear icon in the bottom-left corner of the screen. Click on it to open the page settings. Go to Page Layout → Elementor Canvas to create a blank design.

starting with a blank design in Elementor

Next, choose the folder icon to select a template. Click on the template you want to use to insert it into the editor. You can also create your page from scratch, but a template will help you kickstart your design.

Once you insert the template, you can use the Elementor interface to modify it and use the widgets to add new content. For example, you can insert a countdown timer, social share icons, and CTA buttons.

Under Construction page design with Elementor

You can drag and drop each of these elements onto the page. To modify and customize each area, you can click in the box and browse the Settings and Style options. 

When you’re done styling the page to your liking, you can click on the Publish button at the bottom of the left panel to finalize your template. Now the only thing left to do is put your website into maintenance mode.

Turning on maintenance mode with Elementor

Once you save your changes, you can exit the Elementor interface and return to your dashboard. The next step is to activate maintenance mode. You can do this by navigating to Elementor → Tools and clicking on the Maintenance Mode tab.

turning on maintenance mode with Elementor

Under Choose Mode, you can switch from Disabled to either Maintenance Mode or Coming Soon Mode. Next, you can determine which users will be able to access your site while in maintenance mode.

Finally, you can click on the Choose Template drop-down menu, and select the template you just created.

associating a maintenance page in Elementor

When you’re done, click on Save Changes. This will automatically put your site into maintenance mode and display the maintenance page you designed. 

Now, check your website on the front end. If everything looks as it should, you’re all set!

Make a good impression using WordPress maintenance mode

When you’re working on your website and making significant changes, it’s important to put your website into maintenance mode. This can prevent visitors from encountering an error message and let them know when to expect your site to be live again.

As we discussed in this post, there are three methods you can use to put your website into maintenance mode:

  1. Install a plugin.
  2. Add code to your theme’s functions.php file.
  3. Edit your site’s .htaccess file.

The best method for you will depend on your comfort level and experience working with site files and adding code in WordPress. If you’re a beginner, we recommend the plugin approach. Alternatively, you can further customize your maintenance mode page using an intuitive page builder like Elementor!

This entry was posted in Learn. Bookmark the permalink.

Rob Pugh profile
Rob Pugh

Rob has worked in marketing and product development for more than 15 years, primarily at Jetpack, Mailchimp, and UPS. Since receiving a Master of Science in Marketing Degree from Johns Hopkins University, he’s focused on delivering products that delight people and solve real problems.

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site.

Get up to 60% off your first year.

Compare plans

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum
  • Enter your email address to follow this blog and receive news and updates from Jetpack!

    Join 110,888 other followers
  • Browse by Topic

  • %d bloggers like this: