how to put wordpress into maintenance mode

How To Put WordPress Into Maintenance Mode: Quick Guide

Maintaining your WordPress site is vital for running smoothly and ensuring visitors have the best experience. But sometimes, you may need to put your WordPress site into maintenance mode while you make changes or troubleshoot issues.

Maintenance mode is a useful tool that can help you make changes, updates, or repairs to your website without affecting the user experience.

Once enabled, maintenance mode will inform visitors that the website is under construction and may be unavailable for a short period. Fortunately, putting your WordPress site into maintenance mode quickly and easily can be done with just a few steps.

What Is WordPress Maintenance Mode?

WordPress Maintenance Mode is a feature that allows you to put your website into a “maintenance mode” while you perform updates or make changes to your site.

Maintenance Mode shows your visitors a message indicating that the site is temporarily unavailable to access.  This is useful because you don’t want visitors to see it in an unfinished or broken site while updating or fixing bugs.

To use Maintenance Mode, you can install a plugin or include a line of code in your site’s .htaccess file. Once your edits have been completed, and you are satisfied with your site, you can deactivate Maintenance Mode using the same method you used to turn it on.

It’s important to note that Maintenance Mode is not a substitute for proper website maintenance and backup procedures. It is always a good idea to create backups of your site before making any changes and to test your updates on a staging or development site before deploying them to your live site.

How Will Website Maintenance Affect Your Visitors?

Keeping your site in maintenance mode can have multiple effects on your visitors. Many visitors will be worried about getting authoritative content if your website is already established.

For a new visitor from a reference link, a site under maintenance is just a waste of time and unreliable. On the other hand, a new website keeping under maintenance before making everything perfect is a good idea.

However, no matter how established your site is, an improper maintenance mode can hurt your reputation. In some cases, the maintenance mode can break your website. This can result in trust issues with your site.

Suppose your site is a growing eCommerce business. Sudden maintenance mode can create doubt in your customer’s minds. Especially when you already have pending orders on your site.

However, If your visitors have already experienced a broken site and you put it in maintenance mode while notifying your customers, that can improve your reputation again.

Why and When You Need to Put WordPress in Maintenance Mode?

WordPress is a robust CMS that can handle simple changes while keeping your website live. Uploading, editing, or publishing content doesn’t require keeping the site in maintenance mode. Even some necessary plugins don’t mess up your site anyway.

However, when you are making significant changes on your site, like changing the theme or adding a new plugin, you should do it discreetly from visitors.

When your website is already in a bad state, it is important to keep that in maintenance mode. This will ensure your site will not get any negative impressions.

Also, if your site is broken, somebody may want to take advantage of the lack of security. Putting your site in maintenance mode will prevent anyone from accessing your site’s content.

How to Enable Your Site In Maintenance Mode?

WordPress is a flexible CMS, so there are multiple ways to put it in maintenance mode. For techy guys and short-period maintenance, using code is the best option. On the other hand, for beginners and easy methods, plugins and page builders do the coding for you.

Activate the Default Maintenance Mode with Code

You have two options here to add the code. A safer mode is editing the theme.php file, and an advanced mode is editing the .htaccess mode.

Maintenance With .htaccess Code

You have to open the .htaccess file using a file manager. Filezilla is a free, reliable software if you want to do it from your computer, or you can use your file manager from cPanel.

You have to add a “maintenance.html” file in your root folder. Usually, you will find the root folder under public_html. Create a new file, name it maintenance.html, and add the message you want to show on the maintenance page.

add maintenance file in root

Now click edit on the .htaccess file and add this section of code:

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

Remove Maintenance Mode

Once your editing and update are done on the site removing the snippet, and the file from the root directory will remove maintenance mode from your site.

Maintenance With Editing The Theme.php

Editing the theme file will provide a similar result for less techy people who want to avoid adding new plugins just for temporary maintenance.

Open your WordPress dashboard and go to Appearance>Theme Editor. Choose the function.php and open it in the editor. Copy all the code before making any changes.

Now scroll to the bottom and add this simple code to the function.php file.

add code theme php
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');  

And save to enable WordPress maintenance mode. If you want to change the text on the maintenance page, edit this part.

<h1>Under Maintenance</h1><br />Website under planned maintenance. Please check back later.

Again if you want your website to look normal, just remove the line of codes from the file and save it again.

Activate Maintenance Mode with a WordPress Plugin

If you want to keep your website under construction for a longer period using a plugin is the better option. Also, it will save your time adding and removing code. Some plugins allow you to create a custom maintenance page for a better user experience.

I will recommend SeedProd plugin. It has unique features that you may like for your website. You can try SeedProd alternatives.

Enable Maintenance Mode with SeedProd

How To Put WordPress Into Maintenance Mode: Quick Guide 1

SeedProd is the best landing page builder. You can use it to design landing pages for your products. However, you can also create a Coming Soon and Maintenance Page with this plugin.

After installing and activating the SeedProd plugin, go to the sidebar of the WP dashboard. Click SeedProd>Landing Pages and select the Maintenance page.

SeedProd templates

On the premium plugin, you will get over 180 premade templates. You can select any one or create one from scratch. Edit the maintenance page that you like, and then return to the landing page tab.

Toggle the Inactive button to Active, and you will see a custom maintenance page in incognito mode.

maintenance page demo

Who Should See The Maintenance Page?

As an admin, you will be able to access your complete website. However, if your website is a membership site like eCommerce, you would want your clients and subscribers to access their accounts.

You can exclude those specific pages you want your clients to see. But you can do it with only SeedProd Pro.

Deactivate Maintenance Mode

To deactivate the maintenance mode. You must toggle off the maintenance page from SeedProd.

deactivate maintenance mode-seedprod

Activate Maintenance Mode with Elementor

Almost every WordPress website uses a page builder. Some website uses themes that has inbuilt page builder for the site. Elementor is the best page builder for WordPress now, and it has a default maintenance mode feature.

Install Elementor from the WP repository. Select Template from WordPress Dashboard and click on add new. Select “Page” as a template and name it as you wish. Click “Create Template” to get a blank page.

create maintenance page-elementor

You can create a maintenance page from scratch or use a premade template from Elementor Pro.

elementor maintenance page templates

Once you have made your maintenance page, enabling it for the website is time.

From the WP dashboard, go to Elementor > Tools > Maintenance Mode.

elementor maintenance mode option

Then you need to Choose Mode: Maintenance and choose the template you made using Elementor builder. Click on save to set the page as a Maintenance page.

Deactivate Maintenance Mode

When you are happy with your website progress and want to return to normal mode, you need to disable the page. To enable the maintenance page, you need to go to “Maintenance Mode” and choose “Disabled.” Click on Save Changes, and your website will appear as normal.

deactivate maintenance mode-elementor

What To Do If WordPress Is Stuck In Maintenance Mode

First, you must understand how your website got stuck into maintenance mode. If you have set the maintenance mode manually, you need to remove it similarly. But there are other ways your site might get stuck in maintenance mode.

Do Not Update All Plugins At Once

One of the reasons for getting stuck in maintenance mode is to force update multiple plugins.

You can update the plugins one by one or just leave them on auto-update. Also, you should update each plugin immediately after a new version arrives rather than doing it after 6 months.

Delete The Maintenance File From File Manager

While your website updates, no matter the plugin or theme. It might loop in a bug and get stuck in maintenance mode. You can log into your cPanel and delete the maintenance.php file from the file manager.

Change Plugins Folder Name

If your website is stuck in maintenance mode due to a plugin issue, you can fix it easily by changing the folder name from “plugins” to anything else. This will deactivate all the plugins and updates, and your website will be fully functional again.

Conclusion

I hope you understand why you put your site in maintenance mode and how to do that. This action has both positive and negative impressions on your site.

Usually, you should consider staging your site for major updates; however, maintenance mode becomes your only solution for some issues.

I shared almost every method of putting your site into maintenance mode easily now. It is up to you to choose your favorite method.

Author

  • Modinul Khan

    Modinul Khan is an experienced writer and content creator, specialized in WordPress resources. In his free time, he enjoys exploring novel ideas, traveling, and indulging in diverse readings.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Saeed Khosravi