Search for a plugin or theme

How to Enable Maintenance Mode for WordPress in Every Possible Way

How to Enable Maintenance Mode for WordPress in Every Possible Way

When start building your website or making big changes online, it will be a smart idea to put your WordPress in maintenance mode.

Maintenance mode is a nice classy way to inform your visitors that the website is unavailable or under construction. Thus ask them to come and visit your website at a later time.

In this article, I will teach you how to put your WordPress in maintenance mode in 3 different ways.

What is a Maintenance Mode

The maintenance mode page informs the visitors that the website is currently unavailable. It may be because it was shut down or under construction.

Only the admin and the logged-in users will be able to access the website and the pages while the others won’t.

When to Enable Maintenance Mode

As I said above, the maintenance mode is very useful when creating online changes.

Nobody wants to see an empty page or 404 pages and that is when WordPress maintenance mode comes in handy.

Usually, the website environment has three different stages: local, stage, and production.

A local environment is when you built your WordPress website on your local computer and then transferring it online. The staging environment is an online clone of your website which allows you to create the changes there before publishing it live. The production is your live visible website that lives on your domain name.

Most people are only using the production environment when creating or editing their website. In that case, maintenance mode is almost crucial when creating big changes.

For example, let’s say that you would like to redesign your header. You expect that such a project will take you about two days to do it.

While working on your header, visitors still getting into your website.

When visitors interact with the unfinished header, it will hurt their user experience and your reputation. As a result, many of them will leave your site and never come back.

Thus, while working on your changes, it’s best practice to display a maintenance mode page asking them to come back later.

Besides, you can also ask them to sign up for your email list and inform them when the site is available again.

How to Put WordPress in Maintenance Mode

There are few ways to enable maintenance mode for your website. One way is to use a plugin, the second way by creating a function, and the third way through our htaccess file.

Use a plugin

Using a WordPress plugin to enable maintenance or a coming soon page is the preferred way. Using a plugin is the simplest way and it provides us with the most options of how to design the page.

Also, a good plugin comes with many preload options such as adding a counter or creating a signup form. That way, we can notify our visitors to come back and check us out again when the website is ready.

The plugin we are going to use in this article called SeedProd.

From your WordPress dashboard, navigate to Plugins -> Add New. Search for SeedProd, install, and activate it.

Install the seedprod plugin

SeedProd is a great plugin with many active installations. The free version will let you enable maintenance and coming soon pages.

After activating the plugin, click on the new SeedProd tab on the left.

Under the content tab, you’ll have the option to activate maintenance or coming soon modes.

There is only one difference between the two modes. The coming soon mode will allow search engines to crawl your website as a regular user. The maintenance mode, however, will notify them that the website is unavailable.

Choose your desired mode and click on save all changes.

Enable maintenance mode

After saving, the maintenance mode is active and visible to your website users. The most basic undesigned version of it will look very minimal.

Minimal coming soon template

Customizing the page

Enabling maintenance mode is not enough. You should invest some time to edit and design it better for your visitors. Fourtenetlly the plugin lets you do it.

Again, under the content tab, you’ll have the option to change and add the page content. You can add a logo, change the title, and add content explaining why the website is down.

If you need some ideas or inspiration, make sure to check the coming soon templates posted at Cololib.

In our example, we can leave the headline as-is and add a message body. Something like: “Our website is under construction, but we are working around the clock to make it available as soon as possible. Please visit us back tomorrow morning”.

This is a great message with valuable information that will encourage our visitors to come back soon.

Editing the minimal maintenance mode template

After adding a logo, headline, and body massage, our maintenance page is getting better and looks more professional.

Maintenance page with a logo

After adding the content, change and adjust the colors or add a background image to fit our brand.

To do that, navigate to the Design tab.

Under the design tab, we can add a background image, set its size and position, and change the text color.

Change the maintenance page background image

Treat it like a sandbox, feel free to change, modify, or adjust it. If you like the result, great, keep it. If not, redesign it until it fits your needs.

After playing around, we can see a better maintenance page.

Professional maintenance page

The free version of SeedProd enables us to put our WordPress in maintenance mode and design it as we wish. The pro version will provide us with more options such as adding a counter, signup form, and many more.

Take it further

Yes, we are redistributing the pro version of SeedProd for a very good price and you can find it over here.

After activating the pro version of SeedProd, you can access it under Setting -> Coming Soon Pro.

Click on the Edit Coming Soon/Maintenance Page button to access all the features that the pro version offer.

using the seedprod pro plugin

Inside the editor, view your current maintenance design with the pro features on the left. All you have left to do is choose the feature that you would like to add and click on it.

SeedProd widgets list

For example, when choosing the counter, it will add the counter widget to the page. You can also set the end time of the timer and it will adjust automatically with the time left. Pretty cool!

Add a counter to the page

After playing around with the features and widgets, you can come up with a really nice design.

Complete maintenance template

As mentioned at the beginning, the maintenance mode is only presented to logged-out users and visitors. That way, you as the admin and your subscribers can still log in and access your website as normal.

The pro version allows us to change that and make the website available to the admin role only.

To do that, go back to the setting page of the SeedProd and scroll all the way down. In the Access Control section look for the Access By Role option and change it to Administrator only. Now, only the admin, can access the website and all the other visitors will see the maintenance mode page.

Maintenance mode to everyone except admin role

Now you see why creating this page with a plugin is my preferred way. The options are almost unlimited and it’s very easy to accomplish it.

If you prefer to do it without a plugin, we can still do it with a function or using the .htaccess file.

With a Function

WordPress has a default maintenance mode function and we can add or adjust the text when calling that function.

The function below will put your website in a maintenance mode and it should be placed in your functions.php file or custom plugin of your child theme.

To access your functions.php file navigate to Appearance -> Theme editor and look for it on the right sidebar.

Access the functions file

Scroll to the bottom of the file and paste this function:

// Activate WordPress Default Maintenance Mode
function pfwp_maintenance_mode() {
if (!is_admin()) {
wp_die('<h1>Maintenance Mode</h1><br />Our website is under construction, but we are working around the clock to make it available as soon as possible. Please visit us back tomorrow morning.');
}
}
add_action('get_header', 'pfwp_maintenance_mode');

The function will fire the default WordPress maintenance mode template with a custom text. The page will be displayed to all the sites’ visitors excluding the admin.

WordPress default maintenance page

If you want, you can change the text on line 4 (between the quotes) with your own custom message.

Using the htaccess File

This is my least favorite way to activate the maintenance mode for a few reasons. It is long, complicated, unforgiveness, and will block access to the dashboard for all users including the admin role.

That being said, if you still want to do it, here is how.

In the first step, you’ll have to access the control panel of your website through your hosting dashboard or using FTP software such as FileZilla.

After doing so, in your root folder, look for the .htaccess file. Before editing it, I highly recommend you back it up and download it to your local computer.

Now, open the file and edit it. Scroll all the way to the bottom and paste this code:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maintenance-template\.html$
RewriteRule ^(.*)$ https://example.com/maintenance.html [R=307,L]

The code above will redirect all income traffic to a template file called maintenance-template.html.

Now, we need to create maintenance-template.html file. To do so, open up your favorite file editor (notepad is good) and enter the text that you want to display.

When finish, save the file as HTML and call it maintenance-template. Now, upload the file to the root folder of your website.

Visit your website once again and you’ll see the maintenance-template.html template.

When you ready to make your website live again, re-edit the .htaccess file and delete the code we added above.

Conclusion

In this article, you learned when to enable maintenance mode for your website and how to do it the proper way.

If you made a cool design, let us know and share it with us using the comments box down below.

For extra clarification on the process, make sure to watch the easy-to-follow video at the top of the page.

Leave us a comment down below and let us know which method of this article you used.

Also, make sure to subscribe to our YouTube channel and like our page on Facebook.

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email

PluginsForWP

PluginsForWP is a website specializing in redistributing WordPress plugins and themes with a variety of knowledge about WordPress, internet marketing, and blogging.

Leave a Reply