So, you’ve got a major update to carry out on your WordPress site.
Are you the person who throws caution to the wind and carries out an update without batting an eyelid, or would you instead put your site in maintenance mode and take a backup before proceeding?
For the latter, this article will walk you through the various steps you could consider to put your WordPress site in maintenance mode. And for the former, well, it’s worth considering these too!
Updates could be an overhaul in the website look and feel by applying a new theme, a new homepage, addition of new features, plugin updates, or something else entirely. Whatever update it is, there is a risk of interrupting service, which is why maintenance mode is so important.
From the ‘why’ to the ‘how,’ from using plugins to your theme builder, we’ve covered everything you need to know to put your site in maintenance mode.
Let’s start by understanding the basics.
- What Is WordPress Maintenance Mode?
- When and Why Should Maintenance Mode Be Used
- How to Put a WordPress Site in Maintenance Mode
- Disadvantages of Using Maintenance Mode
- Common Problems While Using Maintenance Mode
- Alternative to Maintenance Mode: WordPress Staging
- Which Is Your WordPress Maintenance Mode Solution?
What Is WordPress Maintenance Mode?
WordPress maintenance mode is when you take your website out of service so you can work on it. Visitors see a friendly notice telling them what’s going on while you perform your work.
That way, they don’t land on a non-functioning website and think you have been hacked or that something has gone drastically wrong.. Typically you’d create a single page or an alert message indicating the website is under maintenance.
Ever seen this?
You’ll agree that it’s better to have a well-designed maintenance page up on your website than a faulty website or one that’s being updated.
Maintenance pages could include contact details, a contact form, or even a countdown timer indicating when the website will be back online.
As long as the page tells the visitor exactly what’s going on, the page will work.
Now that we know what the maintenance page is and how it looks let’s understand when and why we should be using them.
When and Why Should Maintenance Mode Be Used
The short answer is…
When you are updating your website.
Why? Because it’s best to carry out these updates and maintenance behind closed doors!
For the long answer…
Minor updates, such as publishing a new piece of content, updating an image, updating themes, and specific plugins, can be achieved without any downtime.
That being said, not all updates are as simple as clicking on the ‘update now’ link.
For instance, let’s say you’re running a WooCommerce store. And the store has a fair amount of traffic and visitors. Would you run the risk of running an update without taking a backup?
If there are problems with the update, you’ll end up with a broken website and have to get your website down quickly and into maintenance mode. You wouldn’t want your customers to have a bad experience seeing a broken website and forming a negative impression of your brand!
The ideal way to carry out significant updates and maintenance is by:
- Putting your WordPress site into maintenance mode
- Creating a staging site (which is a clone of your actual site)
- Carrying out the updates on the staging environment
- Running a test to check if everything looks fine
- If all is good and working fine on the staging site, carrying out the updates on the live site
- Rerunning a test on the live site
- If all looks good, disabling maintenance mode
The advantage of setting up a staging site is to allow you to run all the updates and maintenance in a test environment. This way, you have nothing to worry about if an update doesn’t go as planned.
If all looks good on the test site, you could push the updates onto the live site.
How do you create a staging site? We’ll cover an easy method later on in this article.
If you are creating a staging site, your site maintenance mode will be for a short period. If you were to carry out the updates on the live site, your maintenance mode will probably be for a more extended period.
Enabling maintenance mode is a much better way to update your WordPress site. You get to display a friendly notification indicating the maintenance and the expected timeframe for the website to return to service.
Let’s now walk you through the steps on how to put your WordPress site in maintenance mode.
How to Put a WordPress Site in Maintenance Mode
When it comes to putting your WordPress site into maintenance mode, there is more than one way of doing it. Using dedicated plugins to using a page builder and editing the actual code. Choose whatever works best for you.
Method 1: Setup Maintenance Mode Using the SeedProd Plugin
In the first method, we’ll use a popular WordPress maintenance plugin, SeedProd. Using SeedProd, you can create beautiful-looking maintenance pages within a few clicks.
To use SeedProd, install and activate the plugin.
Once activated, head over to SeedProd > Pages.
To set up maintenance mode or even a coming soon mode, you’ll simply have to activate it. You can customize or set up your page by clicking on Edit Page/Set up a Maintenance Page.
This will open up the customizer, which looks similar to a page builder. Design the page just the way you want to.
You can add your logo, play around with the colors and background, including contact details, a subscription form, a countdown timer, and lots more.
Once you are done, click on Save. If you’d like to make the page live, click on Publish. You’ll now notice the maintenance page appearing on your website.
You’ll notice a ‘Maintenance Mode Active’ alert on top of your dashboard.
A point to note here is that you may not see your website’s maintenance page if you are logged into your WordPress account. The maintenance page will be accessible if you log out of your WordPress dashboard or check the site in an incognito browser.
That’s how easy it is to set up a maintenance mode on your WordPress site using SeedProd.
How to Deactivate Maintenance Mode
To deactivate the maintenance mode on SeedProd, simply make it inactive.
Method 2: Setup Maintenance Mode Using WP Maintenance Mode Plugin
Another popular plugin to use is the WP Maintenance Mode plugin.
Install and activate the WP Maintenance Mode plugin.
Once activated, head over to Settings > WP Maintenance Mode.
From general settings to designing your maintenance mode page, you have several options to play around with. You also get to include a countdown timer, a subscription form and include your social media channels on the page. All this from the Design tab.
Once you are done, activate the maintenance mode. Simply select ‘Activated’ under the General tab and click on Save settings.
Do you want to collect leads by setting up a bot to converse with the visitors landing on your maintenance page?
Well, you can set up Customize Messages under the Manage Bot tab.
As you can see, there’s a lot you can do with this plugin. Once you are done, don’t forget to click on Save settings.
How to Deactivate Maintenance Mode
As shown in the above image, by selecting the Status as ‘Deactivated,’ you can disable maintenance mode.
Now that we’ve covered two WordPress plugins, let’s look at the other options.
Method 3: Activate Maintenance Mode With Your Page Builder
In this method, we will use a page builder plugin.
The page builder we’ll use is Elementor, a popular visual page builder plugin that allows you to create and edit web pages easily.
For this, select the Maintenance Mode tab under Elementor > Tools.
You can choose to select from either a coming soon or maintenance mode page from the dropdown list. You’d also need to select a template from the dropdown list.
If you haven’t created a page or template yet, there won’t be any in the list. So to set one, simply click on the create one link under the dropdown.
Begin by naming the template and click on Publish.
We’ve named our page ‘Maintenance Page.’ Once you publish the page, the Edit with Elementor option gets activated. Click on it.
You are now on the Elementor dashboard with the widgets on the left-hand side.
Maintenance pages typically come without a header and footer so let’s remove them. For this, click on the Settings icon located at the bottom left of the page.
Select Elementor Canvas under Page Layout dropdown options.
You’d now be presented with a blank canvas to design your maintenance page.
Using the sections and the widgets, go ahead and create a maintenance page. You could add:
- A background color
- A title and some text that includes an email address
- A contact form
That’s precisely what we’ve created, as shown in the image below.
Once you’re done creating your maintenance page, click on Publish.
Now, head back to Elementor > Tools, and select the page template you just created under Choose Template.
For example, we created the Maintenance Page and so that’s our selected template as shown above. Once you are done, click on Save Changes.
You’ll notice the Maintenance Mode On button activated on the top of your dashboard.
Like our previous example, you will either have to log out of your WordPress account or view the website from an incognito browser to view the maintenance page.
As shown in the above image, our maintenance page has been activated.
How to Deactivate Maintenance Mode
To get your site back online and deactivate maintenance mode, select the Disabled mode under Elementor > Tools > General.
Click on Save Changes when done.
That’s how simple it is!
The next couple of methods involves a bit of actual coding. So, unless you are comfortable with editing code, we recommend the above methods we just covered.
That being said, if you are comfortable with coding, please proceed!
Method 4: Using a Custom Function
As mentioned, this method requires you to edit code, and in particular, the functions.php file.
Before you start, we strongly recommend taking a backup of your WordPress site. If you are working on the staging environment (which will be covered later), you’re safe.
WordPress has a default maintenance page that is automatically set when you update your WordPress version. You can put your site in maintenance mode manually and customize the page without any additional plugins.
For this, head over to Appearance > Theme Editor and select the functions.php file.
Now, all you need to do is add the following lines of code to the end of the functions.php file,
// Activate WordPress Maintenance Mode
function wp_maintenance_mode() {
if (!current_user_can(‘edit_themes’) || !is_user_logged_in()) {
wp_die(‘<h1>Website Under Maintenance</h1><br />We have got some exciting updates lined up for you. We will be back online in a jiffy!’);
}
}
add_action(‘get_header’, ‘wp_maintenance_mode’);
Once you’ve added the above code snippet, don’t forget to click on Update File.
To deactivate the maintenance mode, simply remove the above code from the functions.php file.
Method 5: Using .htaccess File
Yet another method where you’d need to get your hands into writing actual code.
This time around, you’ll need to make changes to the .htaccess file.
Again, we highly recommend that you take a backup of your site or the .htaccess file.
In this method, you will need to create an HTML file that will include the website under maintenance message. You could also include contact information and other details if you like.
By editing the .htaccess file, you are redirecting all website requests to that maintenance page.
Also, note that you’ll not be able to access your WordPress admin dashboard in this method. Since that request will also be redirected to the HTML file you create.
You can access your .htaccess file from the website root directory.
Start by creating the maintenance file. For instance, let’s create an ‘undermaintenance.html’ file and include the website under maintenance text.
Then, let’s rename the .htaccess file. Let’s say we rename the file to .htaccess_original. Then create a new .htaccess file and include the following code,
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/undermaintenance\.html$
RewriteRule ^(.*)$ https://mydomain.com/undermaintenance.html [R=307,L]
The above code will ensure that all website requests will be directed to the maintenance page.
Do replace the ‘https://mydomain.com/undermaintenance.html’ mentioned in the code with the actual URL of your maintenance page.
So, now that we’ve covered the why and how of putting your WordPress site in maintenance mode, it’s time to cover the disadvantages, if any.
Disadvantages of Using Maintenance Mode
We’ve seen the advantages of putting your WordPress site in maintenance mode. It helps indicate to your visitors that the site’s going through maintenance and prevent showing a potentially faulty site.
But are there any disadvantages? Let’s cover a few, and you can decide for yourself.
1. Loss of Visitors and Revenue
Existing customers who’ve done business with you will surely come back even if your site is under maintenance, because they know the value and service you provide. But, that may not necessarily be the case with new visitors.
Visitors coming to your site for the first time still need to evaluate your products and services. Unless there’s a compelling reason, if your site is under maintenance, chances are they may not return. Loss in visitors translates to a possible loss of revenue!
2. Unexpected Delays
How long does a website development take to complete? Or, how long does it take to complete the updates and modifications to your website? Do you have a clear deadline?
Yes, we do have a target in mind and work towards completing it within the fixed timeframe. But what if you’ve hit a roadblock or an unexpected delay? The chances are that the launch may get delayed a bit.
This can result in your site being under maintenance for a prolonged time. Again, going back to our previous point, this results in a loss in visitors and revenue.
3. Hamper SEO Rankings
In some cases, activating maintenance mode results in the SSL getting deactivated. With SSL being a prerequisite for your site to get indexed, putting your WordPress site in maintenance mode for too long can hamper your SEO rankings.
Common Problems While Using Maintenance Mode
A search for maintenance mode on some of the popular WordPress forums would reveal that it’s not as simple as it seems to enable and disable your WordPress site’s maintenance mode.
While we aren’t advising against putting your site on maintenance mode while carrying out the updates, we’d like to cover some common problems when activating and deactivating the maintenance mode for your site.
1. Unable to Deactivate Maintenance Mode
Have you faced a situation where you’ve not been able to come out of the maintenance mode?
Users have faced this issue, be it using a plugin or the manual method.
More often than not, the problem is related to caching, where your older content is still being displayed. You’d simply have to clear your cache. You could also try viewing the website in an incognito window.
2. Unable to Access wp-admin Page
In some cases, website owners are unable to access the wp-admin login page of their site. They also get locked out of their site after activating the maintenance mode. Neither are they able to access the wp-admin login page nor the frontend of their site.
One solution to this is using wp-login instead of the wp-admin.
Typically you’d access your WordPress dashboard by using https://yourdomain.com/wp-admin. Right?
If you are unable to access the wp-admin, you could try https://yourdomain.com/wp-login.
The reason being, some plugins create a new page, wp-login. Thereby making the wp-admin page inaccessible.
This is one option. If this doesn’t work, you’ll have to disable the plugin manually. From your hosting control panel, access the public_html folder through the file manager.
Access the plugins folder from within wp-content. Look out for the installed maintenance mode plugin folder and delete or rename it.
You should now be able to access and login using your wp-admin page.
3. Google SERPs Still Showing Maintenance Mode
Is your maintenance page showing up on the Google search engine results page?
Another common issue faced by many users is related to their maintenance page still showing up despite it being deactivated.
One solution to this is to wait until Google recrawls your website. Or you could request a reindexing using Google’s Webmaster Tools.
If you’ve faced an issue that we haven’t covered, you’ve got nothing to worry about.
Check out the WordPress support forum. You’re sure to find similar issues faced by other users, and you’d also find a solution for them too.
And if you don’t find a solution, go ahead and post it on the forum. You’re sure to get a reply!
Alternative to Maintenance Mode: WordPress Staging
We know now that the ideal way to update your WordPress site is by putting it into maintenance mode and carrying out the updates behind closed doors. If the update didn’t go as planned, we wouldn’t end up with a faulty website and, in the process, a lot of unhappy customers.
While you still may carry out the actual website maintenance, an alternative method to carrying out updates is creating a staging site or a staging environment.
Ok, so what is a staging site?
A staging site is where you create an exact clone of your actual site. The staging site is typically set up on a subdomain. For instance, for your domain https://yourdomain.com, the staging site will be set up on a URL such as https://staging.yourdomain.com.
You can perform all your work on the cloned site and then use the push to live tool to make the updated site live once you have tested it. That way, your main site operates normally while you work. Then you can quickly switch the updated site to live, hopefully without anyone noticing!
Before you start with the staging process, we recommend you put the store in maintenance mode, using the earlier discussed steps in this article.
Once your site is in maintenance mode, go ahead and create a staging environment.
The easiest way to create a staging site is from your hosting control panel. Most hosting service providers provide easy-to-follow steps to create a staging environment.
For instance, in your SiteGround control panel, you’ll find Staging under WordPress, as shown in the image.
Select the domain and WordPress installation for which you’d like to create a staging copy.
Once you’ve selected the WordPress installation, create a name for the staging copy, and click on Create.
Just like that, you’ve created your staging environment. It’s that simple!
You have additional options to choose from if you click on the three dots under Actions.
To access the WordPress dashboard of your staging site, click on the icon adjacent to the three dots under Actions.
You will now be redirected to your staging site’s WordPress dashboard.
Do notice the URL created.
In this case, the URL is https://staging3.yourdomain.com/wp-admin/admin.php?page=custom-dashboard.php.
You are now free to run your updates and play around on the staging site without having to worry about what will happen on the live site.
Once you’ve created the staging process, you could choose to get your live site out of maintenance mode.
Which Is Your WordPress Maintenance Mode Solution?
If you’ve been managing your site for a while now, you’ll know that putting your site into maintenance mode is unavoidable at times. From a minor update, layout changes, updates in plugins, themes, or even WordPress versions, we don’t want to risk visitors landing on a non-functional site.
While you can run the updates without putting your site in maintenance mode, we highly recommend you do. Why show your visitors a broken website, just in case an update doesn’t go as planned?
With maintenance mode activated, you can carry out all your updates without having to worry about how it looks on the live site. Once you are done with the updates and happy with the way the site looks, deactivate maintenance mode and showcase your website to the world!
In addition to putting your site into maintenance mode, take a backup, especially if you are carrying out significant updates and changes to your website. It’s always better to be prepared!
Which of the above is your preferred maintenance mode solution? Do comment below and let us know.
Pratik Chaskar holds the pivotal role of CTO at Brainstorm Force, serving as the backbone of the company. Renowned for his organizational skills, strategic thinking, problem-solving attitude, and expertise in leading and executing plans, Pratik plays a crucial role in the BSF’s technological landscape.
Disclosure: This blog may contain affiliate links. If you make a purchase through one of these links, we may receive a small commission. Read disclosure. Rest assured that we only recommend products that we have personally used and believe will add value to our readers. Thanks for your support!
Man you guys missed mentioning using one of your own plugins! I use Convert Pro to create a full-page pop-up that’s active for everyone all the time. Design the pop-up to say that the site is under maintenance and just enable it & disable it like you do any other Convert Pro pop-up.
Hello Sharif,
That’s a nice little trick! Thanks for sharing. 🙂
When having access to your root directory (the one containing ‘.htaccess’, ‘wp-settings.php’ etc.) you could add a file ‘my_index.html’. This file can be of any HTML content and thus gives you the chance to show a totally self-designed message to the visitors. If ‘index.html’ already exists rename it to ‘index1.html’. Rename ‘my_index.html’ to ‘index.html’.
Rename your ‘index.php’ to ‘index1.php’ – and WordPress will load your ‘index.html’ as soon as a visitor is calling your website.
To disable this kind of maintenance mode simply revert the steps.