How to Put a WordPress Site in Maintenance Mode (3 Best Methods)
Do you want to know how to put a WordPress site in maintenance mode? In this post, we’re discussing how to put a WordPress site in maintenance mode and the benefits of doing so.
The maintenance mode is a popular method through which you can show a user-friendly page explaining that you’re making changes to your website. When you’re building or updating your WordPress site live, any people visiting your site will see a broken page. But a maintenance page will explain to the user that your website is being updated and will be back soon.
This is a good approach when you’re updating or working on your WordPress site. In this post, we’re going to learn how to put a WordPress site in maintenance mode. We will see how you can do it using some amazing plugins. We’ll also see how you can do it manually using code.
What is WordPress Maintenance Mode?
The WordPress maintenance mode is a temporary notice that visitors will see when they visit a website that’s being maintained or updated. The developer of a WordPress site puts up this page in order to let people know that the site is being updated and it will return soon.
Generally, there are updates available for WordPress plugins, themes, and even the core version of WordPress. You can apply these updates without using the maintenance mode. But sometimes, you might have to work on your site for a longer period of time. While you’re working on your site, if people visit your site’s URL, they will see a broken page.
Again, if you’re running an eCommerce site, and you need to make some changes to your site, you might lose orders and potential customers.
In order to solve these issues, you can put your WordPress site in Maintenance Mode. This will let the people know that your site is under maintenance and it will be back online once the maintenance is complete.
Many WordPress hosting companies give you the option to put a maintenance mode notice with one click. So check with your hosting provider if they have such a feature to put your WordPress site in maintenance mode.
Why use Maintenance Mode?
As we already discussed, when you’re working on your WordPress site for a longer duration, it’s best to put a maintenance mode page. Otherwise, people will see a broken page when they visit your URL.
Now you might be wondering what are the other benefits of putting a WordPress site in Maintenance Mode. Well here are some plus points of doing so:
Reduce security risks
If there are malicious links on your website, or there are some security threats, it’s best to put your WordPress site in Maintenance mode until the issue is resolved. If you’re using any security plugins, it might send you an alert or notification that something’s wrong with your site. Instantly what you should do is put your site into maintenance mode and start fixing the issue.
If your website has malicious links, this might lead to more problems for your visitors. The best way to combat the situation is to put your site in maintenance mode and start fixing the site. Once the issue is fixed, you can bring your site back online.
Always make sure to secure your WordPress site. If your site is hacked, or if you suspect something is wrong, take immediate action. We also have a post on what to do when your WordPress site gets hacked. Check it out if you’re facing such issues.
Avoid bad impressions
As you might have guessed, people landing on your site and seeing a broken page could very easily get a bad impression. People might lose trust in your brand or the legitimacy of your business. This will not only reduce your website’s traffic but will also harm your brand name.
When you put a maintenance page, with a note explaining the situation, people will be more understanding. On your maintenance page, you can also put a possible time when your site will be back online. Some plugins allow you to customize your maintenance page and add various notes to it. In this post, we’ll look at such plugins.
How to put a WordPress site in Maintenance mode?
Activating WordPress maintenance mode isn’t that difficult. There are numerous plugins to help you in this regard. If you’re not into using more plugins, there’s a manual way of putting your site into maintenance mode. We will look into that as well.
Using a plugin is much easier and more efficient. In fact, many WordPress developers recommend it. So we’re mentioning two great plugins you can use.
Set up WordPress Maintenance mode using SeedProd Plugin (Method 1)
SeedProd is a page builder plugin. Using this plugin you can create your WordPress site pages including “maintenance mode” and “coming soon”. It has a drag-and-drop page builder. Using this plugin you can create your maintenance mode page and also customize it. SeedProd has a free version and a premium version as well. We will use the free version in this tutorial.
This is the easiest way of putting your WordPress site in Maintenance mode. Using the SeedProd plugin you can easily activate the maintenance mode with one single click. You can also customize the maintenance page using its drag-and-drop page builder.
There are various templates available for the maintenance page or coming soon pages. With the free version, you’ll get only 2 of these templates. If you subscribe using your email address, you’ll have access to 10 more templates. The others are only available with the pro version. You can easily select one of these templates and setup your maintenance page. Let’s see how you can do that.
Step 1: Install and activate SeedProd
The first step is to install SeedProd. From your WordPress dashboard go to Plugins > Add New and then search for “SeedProd” in the search bar.
The plugin has over 1 million active installations. Before installing make sure it’s compatible with your current version of WordPress. SeedProd is updated often so you shouldn’t have any problem with the version.
You’ll see an installation wizard, you can go through it or you can skip it if you want.
Step 2: Enable the Maintenance Mode page
Go to SeedProd > Landing Pages and from here you can enable the Maintenance Mode page. That’s it, you’ve set your WordPress site in Maintenance Mode.
Now you’ll see a notification on the top bar of your dashboard saying that your site is in maintenance mode. Now if you visit your WordPress site’s URL, you’ll see the maintenance page.
Step 3: Customize the Maintenance Mode page
You can customize your maintenance mode page as well. From your WordPress dashboard, go to SeedProd > Landing Pages. This is the same section where you enabled your Maintenance Mode from. Simply click on the “Edit Page” button and it will take you to the page builder.
From here you can customize your maintenance page. You can upload images, customize its size, edit the text, etc. If you’ve used page builders like Gutenberg and Elementor, then this setup should be familiar to you. You can drag and drop the elements from the left side to the page in the center. Then you can click on it and customize it the way you want.
After you’re done customizing your maintenance page, click on the “Save” button and your maintenance page will be saved!
How to disable Maintenance Mode in SeedProd
To disable your maintenance mode, you can simply go back to the same section from where you’ve enabled it and click on the maintenance mode toggle to disable it.
Set up WordPress Maintenance mode using LightStart plugin (Method 2)
There’s another plugin called LightStart. This plugin is also very popular and has 900,000+ active installations. It even gives you the option to set up a chatbot so people can interact with your site while your site is in maintenance mode.
The previous version of LightStart used WordPress’s default post editor. But the newer version uses the Gutenberg block editor. Using this, you can customize your own maintenance mode or “coming soon” pages. Here’s you how can use it to set up your WP maintenance mode.
Step 1: Install and activate LightStart
Like before, go to Plugins > Add New and search for LightStart. The plugin was previously known as WP Maintenance Mode, so you can also search for that but now it’s called LightStart.
Step 2: Pick a Template
After you activate the plugin, you’ll be given the option to use a template for your maintenance page. You may choose not to use any template and build everything from scratch, but using a template won’t cause you any harm!
After you select the Maintenance mode, click on the “Continue” button below to continue. It’s going to take you to the email registration screen. You can provide your email address to stay in the loop for updates and new notifications.
You can either sign up or skip it for now.
Step 3: Editing the Maintenance Mode page
Now the plugin will tell you that your maintenance page is ready. You can either click on the “View Page” button to take a look at your page or click on the “Go to Settings” button to go to the settings. Let’s click on the “View Page” button first.
As you can see it’s using the Gutenberg page builder. LightStart also added Otter blocks, using this you can better customize your maintenance page.
You can also see that it added some social media icons, you can simply click on these icons and paste the URLs of your social media pages. You can, of course, remove these icons as well. There’s also a form at the very end. You can remove it if you want, or you can keep it so that people can communicate with you. Using this form, you can also take in customer orders if you have an eCommerce shop.
Customize the page the way you want, once you’re done click on the “Update” button on the top right corner of the screen to save your changes. Now log out of your WordPress dashboard, and visit your site’s URL and you’ll see the WP Maintenance Mode is now on.
How to disable Maintenance Mode in LightStart
If you want to disable the maintenance mode, simply log back into your WordPress dashboard, and you’ll see a notification on top. However, if you don’t see the notification, it might be disabled from the option. In that case, you can go into LightStart settings and deactivate the maintenance mode.
You can also go to Settings > LightStart and under the General tab set the status to “Deactivate” to turn off the maintenance mode.
LightStart Settings
If you want to access the LightStart settings, you can do it from here. There are 4 tabs here, General, Design, Modules, and Manage Bot. From the General tab, you can activate/deactivate your wp maintenance mode. You can also allow/disallow search bots to index your page. You can select which users can have access to the backend and frontend (Admins have access to both).
In the Design tab, you can select which of your WordPress page should be used as the Maintenance page. You can also select a template from here.
In the Modules tab, you can see how many visitors have subscribed to your Maintenance page form. You can also choose to use Google Analytics and enable/disable IP masking. You can also put in your Google Analytics tracking code here.
In the Manage Bot tab, you can actually create a bot that will respond to the visitors. You can customize the bot’s name and avatar. You can also customize its message.
👉 Video: How to Enable WordPress Maintenance Mode
Set up WordPress Maintenance mode using custom function (Method 3)
Your theme has a functions.php file. You can customize this file and put your WordPress site in Maintenance mode. However, if you’ve decided to choose this method, make sure to backup your WordPress site. Because if anything goes wrong with the functions.php file, it might break your site.
Once you’ve backed up your site follow along.
Step 1: Access the functions.php file
Note: The safest way to edit the functions.php file is using an FTP or SFTP client like FileZilla. Or you can also use your hosting’s control panel like cPanel. Editing the functions.php file from the theme editor is risky, because if you make an error, your site can go offline. Then you won’t be able to fix the error because the site will be inaccessible. So check out our post on how to access WordPress files and follow that to access your functions.php file.
Given that you know the risk of using the Theme Editor, we’re still providing that method here. But we recommend the FileZilla or other external methods. From WordPress Dashboard > Appearance > Theme Editor or Theme File Editor you can access the functions.php file (not recommended). On the right side, you’ll find a list of files. These are your theme’s files. Find function.php file and the code of the files will be shown in the center.
We’re using the Blocksy Child theme and it gives you safe access to the functions.php file.
Step 2: Paste the following code
Go to the last line and paste in the following code:
// 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 are performing scheduled maintenance. We will be back on-line shortly!');
}
}
add_action('get_header', 'wp_maintenance_mode');
Your file should look like this:
This will activate the default maintenance mode page for WordPress. You can also change the text on line 15 (in the image) to your own text. Right after the wp_die code, you can put in your custom text between the <h1> </h1> tag.
Step 3: Update
After adding the code, click on the “Update File” button. After that log out of your WordPress admin dashboard and try to visit your WordPress URL. You should see the default WordPress maintenance mode page.
To exit the maintenance mode, simply log back into your WordPress dashboard (admins can log in) and remove the code that you added previously on the functions.php file.
Conclusion
That is how you can put a WordPress site in maintenance mode. In this post, we’ve shown you how to activate the Maintenance mode using 2 popular plugins. There are other plugins as well that allow you to put maintenance or a “Coming Soon” page. We also showed you the manual process as well. But if you do the manual process make sure to backup your site for safety.
The best way to put a WordPress site in Maintenance mode is by using a plugin like SeedProd or LightStart. It’s the safest and your maintenance page will have a cool design. This will be pleasant for the visitors.
We hope this post was helpful and you were able to put your WordPress site in Maintenance mode easily. If you have any queries, feel free to comment down below and let us know.
Disclaimer: This post may contain affiliate links and we may receive a small commission if you purchase something by following them. However, we recommend services/products that we believe good to serve your purpose.