Whether you are creating, rebranding, debugging, or updating your website, you must understand WordPress in Maintenance mode to ensure that visitors’ experience is not affected.  

This article guides you on how to put your website in maintenance mode. It explains everything you need to know, from using the maintenance mode to exiting it. 

What is WordPress in maintenance mode? 

WordPress upkeep mode is used for a site when changes are being implemented that can break the website. 

For example, minor changes, such as publishing or updating the content, should be possible when your WordPress site is live. But, it’s ideal for keeping the WordPress site offline when performing significant changes to avoid poor impressions. 

The support mode also displays a maintenance mode message highlighting your site’s state. This message clarifies why the site is offline with an estimation of when it will be live once more. 

WordPress maintenance mode utilizes the function wp_maintenance and creates a .maintenance file. These files contain the message.  

Once the maintenance process is complete, WordPress can be set to delete the maintenance file, and your site will start functioning. 

Another application of WordPress upkeep mode is to prepare an upcoming site. With the help of WordPress upkeep mode, you can create a Coming Soon screen. 

This will let any user accessing your website see the ‘upcoming website’ message and know when they can return. 

When Should You Use Maintenance Mode? 

Following are some of the reasons to use the Maintenance mode:

  • To rebrand an entire website.
  • To add new or different details to an existing popular page
  • To install a plugin that enables a new feature of functionality.
  • To troubleshoot an error or a bug.
  • To clean up a website after a breach in security.
  • To create a Coming Soon and announce a new website.

Also Read :- Complete Guide on How to Fix WordPress Maintenance Mode Error in 2021

How Will Website Maintenance Affect Your Visitors 

Wondering, how will website maintenance affect your visitors?

A WordPress site can appear broken during maintenance which creates a bad user experience. Users may question the site’s credibility or security, hence negatively impacting future traffic. 

The default maintenance mode and splash page show the text “Briefly unavailable for maintenance. Check back in a minute.” which is rather dull. 

The custom maintenance page gives a better client experience. Allows you to display a custom message and design to suit your brand image. 

You can also create a staging environment that reduces the maintenance time. It’s a copy of your site to make the changes and not affect the real site. 

Once you are finished with the changes, you must push the updates to the original website. The changes will be applied without any downtime. 

How to Put Your WordPress Site in Maintenance Mode 

Now, we learn how to put your WordPress website into maintenance mode and how you can make this process more pleasant. 

There are six ways to use the maintenance mode:

  1. Using Code.
  2. Using a Coming Soon WordPress plugin.
  3. Using Theme or Page builder.
  4. Using CPanel Dashboard.
  5. Using a Custom Function
  6. Using the .htaccess File

Using code to activate the default maintenance mode 

For short-term downtime, you can use WordPress’s default maintenance mode page to let users know you’ll be right back.

Step 1: Go to the WordPress Theme Editor

To activate maintenance mode, use the theme editor in WordPress under Appearance > Theme Editor:

Image Shows Step 1 Of Using Code To Activate The Default Maintenance Mode 

In case you don’t see it, request admin access to the WordPress website from the owner.

Step 2: Open the functions.php File

Look for the file > Theme Functions (functions.php):

Image Shows Step 2 Of Using Code To Activate The Default Maintenance Mode 

Click on it and open it in the code editor on the left.

Step 3: Add Maintenance Mode Code to functions.php

Once functions.php is open in the editor, copy the code snippets in the file and save a copy on your desktop.

Image Shows Step 3 Of Using Code To Activate The Default Maintenance Mode 

Then, scroll to the bottom of the file to add the following code snippet:

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');

It is the default WordPress maintenance mode setting and message.

To edit, replace this bit with your own wording:

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

Now, click “Update File.”

Step 4: Confirm Maintenance Mode Is Active

As a logged-in user, you won’t be able to see maintenance mode when on the website. This allows you to keep working and previewing your changes.

(Note: Make sure it’s active.)

To activate, either log out of WordPress and visit the website or open it in a new browser.

Using a WordPress Plugin to activate the maintenance mode

For longer downtime, leaving the default WordPress message up does not make a very good impression on visitors.

To make the page more engaging, use a WordPress maintenance plugin.

This will allow you to put a designed page up there and even leave contact information. Provide details on what’s to come. Ask interested users to leave their information through a contact form.

Step 1: Find a WordPress Maintenance Plugin

Go to the Plugins menu > click “Add New”.

Next, type “maintenance in the search bar on the top-right.”

Image Showing How To Install The Plugin

To narrow down the options, you can use one of the following plugins:

These plugins make it easy to turn maintenance mode on or off and help to customize the appearance of the page.

Note: Using a free WordPress plugin to build a maintenance page is always a good option.

For the Under Construction WordPress plugin, you won’t be able to add your logo or customize the colors, etc.

But the maintenance page will be up in minutes.

When using the SeedProd plugin, you’d have no premade templates to use. Create everything from scratch. But you can add things like your logo, brand colors, etc.

The quick implementation option might be best if you’re cleaning a hacked site.

For a longer-term rebrand, building a custom page makes more sense. Also, buy a premium maintenance plugin to customize the page and its functionality.

Step 2: Install the Maintenance Plugin

After selecting the plugin, install it on the site. In this example, we’re using Under Construction.

Click the “Install Now” button:

Image Showing How To Install The Plugin

After installation, the button will turn blue and say “Activate”. Click it once more.

You would be taken to the plugin’s Settings page. If not, go to your Plugins list and select “Settings” beneath the maintenance plugin:

Image Showing How To Activate The Maintainance Mode Plugin

 

Before turning it on, spend some time setting up your maintenance mode page.

Step 3: Design the Maintenance Mode Page

Some plugins come with maintenance mode page templates; others need an upgrade to pro to get access.

Image Showing How To Use The Maintenance Mode Plugin

For Under Construction, there are some free basic templates you can choose from.

If your plugin doesn’t come with template options, that’s okay. You should still have the option to customize the colors, fonts, and images.

Step 4: Add Content to the Page

Setting up content on your maintenance mode page would be simple, and you should get full control over all the content that appears on the page:

Image Showing How To Add Content To The Page

Customize these content elements:

Title: The title that Google will show to users when your site appears in search.

Description: The description that Google places below the title in search results.

Headline: The headline/ title that appears at the top of your maintenance mode page.

Content: The body of the page.

Optin Boxes and Popups: Turning on this setting and activating the MailOptin plugin allows you to add an opt-in form to your maintenance page. This sends a message to visitors’ email once your site is available.

Content Font: Update the fonts if you’re using custom fonts on your website.

Login Button: Embed a “Login” button for other users that need access to the WordPress admin area.

Social & Contact Icons: If you have social media pages set up for your site, add them to the page. This also helps in contacting the visitors.

You’ll have the option to add different social media links and your contact information. Don’t overdo it, and only add the essential details.

Finally, save your changes.

Step 5: Preview Your Changes

Preview the page after finalizing the design and content pieces.

The “Preview” button is at the bottom of the Main, Design, Content, and Access pages:

Image Showing How To Preview The Changes

Make any other necessary changes, save them, and move on to the next step.

Step 6: Create the Optin (Optional)

For longer downtime, create an option for the page; if not, then skip to the final step.

Step 7: Turn on the Maintenance Mode

Go to the Main tab in the maintenance mode plugin. Switch the “Under Construction Mode” to the “On” state.

Image Showing How To Turn Onn The Maintenance Mode

On this page, you can also configure settings. Turn maintenance mode off on a certain date and time. Add your Google Analytics tracking code to keep tabs on traffic to the page.

Once finished, click “Save Changes”. Maintenance mode will now be live on your website.

Note: To turn maintenance mode off with a plugin, turn the activation to the “Off” position.

Using the WP Maintenance Mode Plugin 

This plugin allows you to activate maintenance mode without changing any code.

First, download, install and activate the WP Maintenance Mode plugin. Now, select Settings -> WP Maintenance Mode from the WordPress dashboard.

You will see five tabs on the Settings page – 

General – This tab is used to:

  • activate or deactivate WordPress maintenance mode.
  • Activate the Bypass for Search Bots feature and access your website during maintenance.
  • choose which users can access the back-end when under maintenance mode with the help of Back end Role and Front end Role options

Image Showing How To Use The Wp Maintenance Mode Plugin

Design – This tab is used to: 

  • create a splash page.
  • Add title, heading, background, and text to your splash page.

Image Showing How To Use The Wp Maintenance Mode Plugin

Modules – This tab is used to:

  • configure the countdown timer by setting the starting and remaining time.
  • connecting your social network accounts to the splash page.

Image Showing How To Use The Wp Maintenance Mode Plugin

Manage Bot – This tab is used to:

  • create an interactive subscription form to attract new subscribers.
  • Add ten customizable messages and four response options (this can be used to collect user information).

Note: In the Modules tab, select Export as CSV under the Subscribers to download the subscriber’s list.

Image Showing How To Use The Wp Maintenance Mode Plugin

GDPR – This tab is used to:

Image Showing How To Use The Wp Maintenance Mode Plugin

After making the necessary changes in every tab, click Save settings, and your maintenance mode is now ready for use.

Using the SeedProd Plugin 

SeedProd is a landing page builder plugin for “Coming Soon” and “Maintenance” modes with its drag-and-drop builder.

Follow these instructions to set up a maintenance mode page:

  • In SeedProd’s landing page templates library, click on a maintenance mode template you like. This will take you to the drag-and-drop builder. Here you can customize the maintenance mode templates. Remember to click Save to save the changes.

Image Showing How To Use The Seedprod Plugin

  • On the landing pages section, click Add New Landing Page button to add more landing pages. If you want to rename the page title and URL on the Page Settings section of the builder.

Image Showing How To Use The Seedprod Plugin

  • To set up the maintenance page. Turn on the maintenance mode click on the Activate button on the plugin’s dashboard. Once activated, you will see the message Maintenance Mode Active at the top right corner of the WordPress admin page. 

Image Showing How To Use The Seedprod Plugin

Using the WP Maintenance Plugin 

WP Maintenance is also a maintenance plugin that helps you create a custom maintenance mode for a WordPress site.

Image Showing How To Use The Wp Maintenance Plugin

Once installed and activated, go to the plugin’s settings from the left sidebar. Here you would see nine sections available:

  • General – Use this section to configure the landing page message and find the button to enable maintenance mode.
  • Colors & Fonts – Use this section to customize the appearance of your landing page. Changes in this section must be made manually.
  • Pictures – Use this section to add a header image, a background image, a pattern picture, and a slider. 
  • Countdown – Use this section to set the launch date and time and automatically disable the maintenance mode when you want to make your website live.
  • CSS Style – Use this section to customize the page by inserting custom CSS.
  • SEO – Enable SEO settings, such as editing the page’s meta title and meta description and adding a favicon.
  • Social Networks – Use this section to add social network accounts to the maintenance landing page. 
  • Footer – Customize the text, enable the footer to the maintenance screen, and add a link to the dashboard.
  • Settings – Enable the theme maintenance page. Delete custom Maintenance Page Settings upon plugin deactivation. Display 503 Service Unavailable server error code.

Elementor 

Elementor is a free, drag-and-drop page builder plugin that helps in designing and building pages in WordPress. Elementor is a user-friendly plugin with a maintenance mode page, which you can enable in the tools menu.

You can either use Elementor templates to create your maintenance mode page or import one to it. The predesigned maintenance templates are all labeled as “Coming Soon” pages. 

You will be able to select the template in the Maintenance Mode tab under Elementor → Tools.

Image Showing How To Use The Elementor Plugin

Using Theme or Page builder to activate the maintenance mode

Another way to activate maintenance mode in WordPress is to use a theme or page builder plugin that includes the setting.

The following steps will show you how to build this out with Elementor.

Step 1: Select the appropriate mode

Find the Maintenance Mode setting under Tools in the Elementor page builder plugin. 

Depending upon the mode you choose. This feature will configure your site to send the right status code to search engines.

Image Showing How To Use The Elementor Plugin

For instance, in the ‘Coming Soon’ mode, Search engines will continue indexing your site when it is being built for the first time. 

If in case you are repairing a hacked site, bug, or implementing a quick update. The ‘Maintenance’ mode informs the search engines not to index your website right now.

Step 2: Create the page template

As explained in the previous section, Elementor provides free page templates for the maintenance mode. 

Image Showing How To Use The Elementor Plugin

Select a template you like and click the “publish” button

Step 3: Design and Add Content to the Page

When adding design and content to the template, you must ensure that access to it is blocked. This can be done by adjusting two settings, Hide Title and Page Layout.

Image Showing How To Use The Elementor Plugin

To remove the header and footer, change the Hide Title toggle to “Yes” and the Page Layout to Elementor Canvas.

Now, go to the Library folder icon in the preview. Add an Elementor template to the maintenance page, and do a search for “maintenance.”

Image Showing How To Use The Elementor Plugin

Select the template that you like and insert it to the page. You can customize the design of this template or build your custom page with the elements you want, such as your logo, social icons, lead generation form, animations, etc.

Image Showing How To Use The Elementor Plugin

Step 4: Preview the Maintenance Page template

After creating your maintenance page template, give it a preview and if you are happy with the changes, then go ahead and save them.

Image Showing How To Use The Elementor Plugin

Step 5: Activate Maintenance Mode with Elementor

The final step is to return to the Elementor > Tools menu and activate the maintenance mode.

Using the hPanel Dashboard 

To use this method, log onto your CPanel account, then go to the WordPress dashboard>Core. Here, find the Maintenance Mode and activate it by clicking on the slider. 

This is an easy method and does not need you to use any other WordPress plugins. 

Image Showing How To Activate The Maintenance Mode Using The Hpanel Dashboard 

Note: You cannot customize the Maintenance page with the hPanel dashboard.

Using a Custom Function 

To activate the Maintenance mode using a custom function, follow these steps:

  1. WordPress admin dashboard > Appearance -> Theme Editor. On the right side, choose Theme Functions which will open the functions.php file. Now you can edit the code.

Image Showing How To Activate The Maintenance Mode Using A Custom Function

  1. Add the following code at the end of the file:

Image Showing How To Activate The Maintenance Mode Using A Custom Function

This code will activate the default maintenance screen. You can also change the HTML message by changing the code.

In the wp_die function, you can edit this HTML text to any message you want. 

  1. Click Update File and remember to remove the code from the functions.php file. Now make the website live again.

Using the .htaccess File 

When using the .htaccess file, use the following procedure:

  1. Login to hostinger hPanel > File Manager> public_html Locate the .htaccess file.
  2. Create or upload a maintenance.html file containing your maintenance message.
  3. In the public_html directory, find the .htaccess file. Open and Edit the file by right-clicking and selecting it.

Image Showing How To Activate The Maintenance Mode Using The .Htaccess File

To create a backup, paste the content of the .htaccess file into a new file named .htaccess_default. Now, add the following code to the original .htaccess file content:

Image Showing How To Activate The Maintenance Mode Using The .Htaccess File

Users will redirect to the maintenance page, and you can keep working on the site.

Creating Your Own Splash Page for Maintenance Mode 

During maintenance, you can create beautiful landing pages with WP maintenance mode. To make the splash page, go to the plugin setting page and click on the Design tab. 

Start with a title, heading, and content to display on the maintenance page. For a Coming soon page for WordPress, the content should change accordingly.  You can either choose from the background color, choose a predefined image, or upload your image.

Once done with the settings, remember to click on the save changes button to store the settings.  

How to add countdown and newsletter signup on the WordPress maintenance page?

For creating the coming soon mode, you can use a countdown timer module included with the plugin.

The countdown timer module is on the Modules tab on the plugin’s Settings page. Here, you can choose the start date and enter the remaining time.  

Your users can subscribe for notifications when your size is back online. The users will only get notifications through the plugin.

(Note: You need to ensure that your WordPress site can send emails.)

You can also add your social media profile links in the coming soon or maintenance mode page. Just add your social media profile URLs, and the plugin will display the social buttons. 

You can also add your tracking ID and enable Google Analytics. Remember to save the changes by clicking on save settings.

The maintenance can also set up a pre-programmed live chatbot. That includes an interactive conversational help box and asks users if they want to subscribe. 

Enabling the bot will hide the contents of the maintenance mode that you set on the General setting page.

For collecting client information through the information exchange structures on your page, you would need to make it GDPR agreeable. 

If you are collecting user data and want to ensure GDPR compliance. Use the GDPR tab on the plugin’s settings page to enable the privacy module.

How to get a WordPress site out of maintenance mode 

To relaunch your website and get it out of maintenance mode. You can go back and use the Elementor tools to switch it off.

Here are the steps you must follow:

Go to Dashboard > Elementor > Tools > Maintenance Mode> under ‘Choose Mode’ switch to disable. 

Once you save the changes, you will see the red notification on the top of the page removed.

What to Do When Your Website Gets Stuck in Maintenance Mode 

Not sure how to prevent your site from getting stuck in WordPress maintenance mode?

Even after deactivating, if your website gets stuck in the maintenance mode, in that case, you need to delete the “.maintenance” file by connecting to your server via FTP. You also need to clear the cache on your WordPress site.

Apart from fixing the maintenance mode errors. Make sure to follow these two tips to avoid any unwanted stuck in the future:

1. Try not to update all the plugins at once. After getting the new versions of many plugins simultaneously. Your site can close because of many unknown conflicts between themes and plugins. So make sure to click Update for an individual plugin at a time.

2. Test if all your themes and plugins are compatible with the latest version of WordPress. Use the WordPress dashboard to confirm.

Also Read: Coming Soon vs Maintenance Mode: What’s the Difference (Explained)

Compatibility issues with WordPress 

If you are facing compatibility issues with WordPress. Make sure to keep your WordPress version up to date. Also, any plugin that you update should be compatible with your version of WordPress. 

Luckily, WordPress now has a feature on the Update screen that will let you know if a WordPress plugin is compatible with your version of WordPress.

It’s a basic rule to follow – do not update a plugin or theme if it is not 100% compatible with your version of WordPress. 

Make sure to test the updates in a controlled environment. This can be done in a few different ways—the most commonly used being site staging and transferring your site to a local test server.

Remember to check if site staging is included in your hosting plan. If it is, you should be able to clone your website to another location on your server and test the updates there. 

You can either buy a cheap shared hosting plan or create your server with a program like MAMP to use as a test server.

Preventing plugin glitches 

There are few ways to avoid a glitch from occurring in a plugin. But the least you can do is research the plugins you use.  

This way, you only install plugins that provide a functioning code and avoid your website from getting stuck in maintenance mode.

Conclusion 

WordPress maintenance mode helps to make sure that your visitors have a great experience even if your website is offline for any reason. 

Keep trying the techniques mentioned in this article to use the Maintenance mode for unplanned or planned maintenance. 

If you are not familiar with coding. Try some simple plugins. Or familiarize yourself with coding and learn how to run a professional website.

LEAVE A REPLY

Please enter your comment!
Please enter your name here