A Quick and Thorough Guide to WordPress Maintenance Mode
As you build or maintain a WordPress website, you’ll likely find moments where you need to make your site inaccessible to the public. This is – rather obviously – referred to as putting your site into “maintenance mode.”
Whether you’re performing simple plugin updates or making full-scale site modifications, maintenance mode is a handy tool to have in your developer’s toolkit. But when should you use it? Are there times when it’s not appropriate? And how can you implement it most effectively?
These are questions I’ll endeavor to answer today in full. So pull up a chair and get settled. Let’s unpack maintenance mode, shall we?
Why Maintenance Mode?
There are several situations where maintenance mode comes in handy.
The first situation is when you are performing website updates which may involve updating themes and plugins, or installing and setting up a new theme. Usually, a new theme means you have to at least set up some basic options to get it to look and function as intended. Maybe it involves custom widget areas. Or perhaps you want to customize the colors and the fonts or build custom page layouts.
Whatever the case may be, you certainly don’t want your visitors confused as they browse different posts and pages and see a different look each time. In such situations, enabling maintenance mode lets them know you are working on your site and they can check back later once you have everything set up the way you want.
Leading Up to a Live Launch
The second situation is when you are building your site on a live domain and you don’t want your visitors to see it until you’re ready to officially launch. But maybe you’d still like a way to grow your email list and or social media following while you get your site ready.
In this case, it would make little to no sense to show an unfinished website with no content and a constantly changing design. An elegant solution is to enable maintenance mode which allows your visitors to sign up for your newsletter and follow you on social media.
There are a few different ways to put your website into maintenance mode. In the sections below, we’ll explore those options and the benefits and tools for each.
Note: As always, make sure you have a current and reliable backup of your site before making any changes. For more information on how to backup your site, check out 4 Top WordPress Multisite Backup Solutions Tested and Reviewed and How to Backup Your WordPress Website (and Multisite) Using Snapshot. We always recommend backing up with our Snapshot plugin as it’s compatible with both standalone and Multisite sites.
Method 1: Built-In Maintenance Mode
The first way to put your WordPress website in maintenance mode happens without you having to actually do anything. WordPress has its own built-in method for creating and displaying a maintenance message and it happens every time you run an update, be it one for a plugin, theme, or the core files. WordPress automatically creates a .maintenance file in the root of your site’s installation that displays a message to anyone that might happen across your site during an update.
The message is straightforward and looks like the below:
“Briefly unavailable for scheduled maintenance. Check back in a minute.”
Once updates are completed, your site is automatically returned to normal and your visitors can freely continue to browse your website like nothing ever happened.
This method works great when all you are doing is updating your themes and plugins. However, if updates are going to take awhile and/or you want to actually work on your site and make changes, there’s another way to display a maintenance mode message. Two ways, actually.
Choosing to do one of the following will show visitors a message of your choosing when you’re performing site maintenance while you still have access to your site’s front-end to see the effects any changes you make will have on the site’s design and function.
Method 2: Manual WordPress Maintenance
If you are comfortable with writing code and you don’t want to install yet another plugin then the easiest way to your website in maintenance mode is by adding a few lines of code to your functions.php file.
Your functions.php file can be found in Appearance > Editor. By default, the style.css file will open up first but on the right-hand side, you can see other files that make up your theme. Click on functions.php and at the very bottom, paste the following code then hit Save:
Note: We always recommend that you make changes to a child theme and not directly update your functions.php file. Check out our guide on How to Create a WordPress Child Theme for the full rundown.
The benefit of this approach is that everybody who is not logged into your website will see a maintenance page like in the screenshot below:
The administrator of the website–in this case, you–will still be able to access the website and see it displayed normally, allowing you the see all the changes you make on the backend. When you’re done with your maintenance work, simply delete the code you pasted into the functions.php and click Save which will make your site accessible to public again.
Method 3: Maintenance Mode Plugins
Finally, the third way of enabling maintenance mode is via plugins, which is especially handy if you don’t feel comfortable editing the code or want more customization than what the other two methods offer.
In this section, we’ll explore the best maintenance mode plugins currently available.
WP Maintenance Mode is a free plugin that lets you add a maintenance page to your site so you can let visitors know your blog is down for maintenance. There’s also the option of adding a coming soon page for new sites.
There are various options in the backend of the plugin so you can change the status of the plugin, bypass search bots, and set user level restrictions. With minimal setup, you can get a beautiful looking splash page up on your site in minutes.
With more than 400,000 active installs and a 4/5 review on WordPress.org, this plugin is hugely popular and worth checking out.
Simple Maintenance Plugin doesn’t require any additional configuration or setup. All you need to do is activate the plugin and your website will be in maintenance mode. It’s a simple, no-frills plugin that has a responsive layout.
This plugin is free.
Slim Maintenance Mode is another lightweight plugin that puts your website into maintenance mode simply by activating the plugin. The plugin works with any theme and you can see an alert message in the backend when the plugin is active. It sends HTTP response status code 503 Service Unavailable, which is especially useful when it comes to search engines because it won’t hurt your rankings. To deactivate the maintenance mode simply deactivate the plugin.
Slim Maintenance Mode is free.
Maintenance Mode allows you to add a maintenance mode or a coming soon page on your website. Maintenance Mode has quite a few number of features such as the ability to change the headings and subheadings on the maintenance mode page, add a progress bar, add a logo and social media icons, set a favicon for maintenance page, enable HTTP 503 headers, and a visual editor to change the content.
The plugin also has a paid version which allows you to enable the countdown timer, add a subscriber form, integration with Google Fonts, and enable maintenance mode depending on the user role.
The paid version is available for $27.
Maintenance Mode Page allows you to add a stylish coming soon template with a background image slideshow, countdown timer, about us page, contact info page, and a subscribe field. The plugin features a responsive, Retina-ready design and works with any WordPress theme. Customization options allow you to tweak the colors scheme and to disable the sections you don’t need.
This plugin is free.
EZP Coming Soon Page plugin lets you collect your visitors’ email addresses while you work on your website. The plugin is responsive and includes an optional countdown timer. You can use the built-in background or upload your own to display on your coming soon page and you can add your own logo and tweak the basic colors and fonts.
The free version of the plugin will store your visitors’ emails in WordPress database which you can then export as CSV file to MailChimp, AWeber or any other major email provider. The premium version lets you sync your subscriber list to Mailchimp automatically and gives you the ability to add video backgrounds, additional social media icons, and bonus backgrounds.
The paid version starts at $14.95 for use on two websites. For $19.95 you can install the plugin on 10 websites, and finally for $29.95 you can install the plugin on unlimited websites.
Launchpad displays a beautiful, responsive coming soon or maintenance page on your website with the ability to collect emails, show social media icons, and display a countdown timer until your launch date. Launchpad also has an Auto-Launch switch which will automatically disable maintenance mode once your launch date arrives. The plugin features three unique themes and 11 different backgrounds to give you a nice headstart but it also allows you to upload your own images.
Launchpad is free.
Coming Soon Page & Maintenance Mode is touted as the #1 maintenance plugin among WordPress maintenance plugins. The free version of the plugin comes with a limited set of features which allow you to upload your own logo and background image as well as change the text colors, use custom HTML & CSS, and includes support for multi-site installations and BuddyPress.
The paid version offers plenty of other features such as the ability to give your clients a secret link to view the website without having to log in, a custom look and feel without coding, integration with all major email providers, social media profiles and sharing buttons, integration with Google Fonts/Typekit, Google Analytics and Gravity Forms, a referral system, the ability to display an incentive after a visitor signs up, and much more.
The premium version of the plugin is available in 4 different pricing tiers, with the lowest being $29 for 1 site and 1 year of support and the highest being $199 for unlimited websites and lifetime support.
Coming Soon is an easy-to-use plugin which integrates with MailChimp and gives you the ability to change colors, backgrounds, upload your own logo, embed videos, add Twitter, Pinterest, LinkedIn, Instagram, and Facebook icons and select different Google Fonts. The free version of the plugin has 5 different pre-designed themes.
Maintenance Mode Troubleshooting
At first glance, putting your website into maintenance mode and then disabling it once you’re done seems like a piece of cake. However, there are times when things go wrong and it’s possible for WordPress to get stuck in this mode. Thankfully, it’s an easy fix to get your site back to normal.
1. How to Take WordPress Out of Maintenance Mode
If you refresh the page while WordPress is performing a core, plugin, or theme update – in other words, you interrupt the update process, your website might get stuck in maintenance mode making your WordPress dashboard completely inaccessible. If that happens, all you have to do is manually take WordPress out if its built-in maintenance mode.
To do this:
- Log into your web host’s cPanel,
- Go to File Manager and click on the folder of your WordPress installation, and
- Delete a hidden file called .maintenance.
If you only have access to your website files via FTP then you will need to use a program like Filezilla to access your site’s files and make this deletion.
2. How to Take a WordPress Plugin Out of Maintenance Mode
When it comes to maintenance plugins, they can get stuck in maintenance mode as well if you have a caching plugin installed or your host is using a caching layer. In this case, you just need to clear the caching plugin’s cache or clear your host’s cache. Usually, your host will have a button in the WordPress admin that says “Clear Cache.” After you are done with maintenance work, it’s safe to deactivate and uninstall the plugin.
Putting your website into maintenance mode has a number of uses. It’s not reserved only for performing core and regular updates, but it is a useful tactic when you want to make major changes to your website’s design or functionality.
From simple maintenance messages to more complex designs which allow you to share more information with your website visitors and even collect email address or build your social media following, there is a way to enable maintenance mode for almost any situation imaginable.
Have you experimented with maintenance mode? What are your favorite maintenance plugins? Join the conversation below and share your opinion.
WIN a Share of $5K
Subscribe to our blog this #hostingmonth for a chance to win one of 5 prizes of $1,000 WPMU Dev credit! Learn More.