Blog

Manually enable and customize maintenance mode in WordPress

Manually enable and customize maintenance

Do you want to place your WordPress site in maintenance mode? The maintenance mode allows you to display a user-friendly notice to your users rather than a broken site during website maintenance.

It also allows you to securely perform any maintenance task while ensuring that folks who need access to the web site have the access.

In this article, we will show you how to easily and rapidly place your WordPress site in maintenance mode.

Why and When You Need to Place WordPress Site in Maintenance Mode:

Sometimes you’ll have to work on your website for an extended period. Like once you are manually fixing a replacement theme or configuring a replacement plugin that changes the behavior of your website. During this point your website may appear broken to your users for a period of your time.

If your website features a lot of traffic, then you don’t want your users to ascertain a broken website because it creates a nasty user experience and provides them a poor impression of your brand.

If you’re not using a staging site, then you actually have to put your website under maintenance mode because you’re applying changes on the live website. This enables you to remedy the bad user experience problem.

Putting your WordPress site in maintenance mode allows you to point out a user-friendly notification, alternative links to go to , and supply a timeframe for when the upkeep is going to be done.

How to Put WordPress in Maintenance Mode? Use Below These 3 Methods:-

Method 1 – Using WordPress Plugin

The method is specially for those users who want to activate WordPress maintenance mode without touching a single line of code.

All you need to download and install the WP maintenance mode plugin. After the activation of it, you need to visit the plugin’s settings. For setting up this you go to your right tab and choose, Settings -> WP Maintenance Mode.

In the settings page, you can see 5 tabs: General, Design, Modules, Manage Bot and GDPR.

General

In the top of the overall tab, you’ll find Status. so as to activate this plugin and set your website to WordPress maintenance mode, you’ve got to vary it to Activated. Under the Status options, you’ll find Bypass for Search Bots feature. If you set this feature into Yes, search engines are going to be ready to access your website during maintenance.

Next, there are Backend Role and Frontend Role options, here you’ll choose which user roles can access your backend while it’s under maintenance mode. If you don’t set this, only the Administrator is going to be allowed.

Design

The Design tab is where you create a beautiful splash page. To start out creating your splash page, you’ll directly attend the Title (HTML tag) option. during this part, add the title of your splash page also as Heading and therefore the Text.

Once you’re through with the message, you’ll change the background of your maintenance page. For instance , you’ll change its color or go even further and use a picture as a background.

Modules

In this tab, you’ll set the countdown timer. Set the beginning and therefore the remaining time. Additionally , you’ll ask your visitors to subscribe and get a notification once your website is live again.

The next option within the Modules tab is the place where you’ll configure your social networks. All you would like to try to do is put your social media account link. The plugin will automatically display the social media button icon on the page.

Manage Bot

The next useful tab is that the Manage Bot tab. This tab allows you to feature a chatbot to your splash page. Thus, you’ll maintain interactive communication together with your visitors despite being in maintenance mode. you’ll even name the bot and provide it an avatar.

GDPR

If you ask your visitors to subscribe to your splash page, you would like to find out your GDPR tab. GDPR stands for General Data Protection Regulation. Since you’re collecting your visitor data, you would like to activate it.

Once all these are complete, press the Save settings button and visit your website.

Method 2 – Using a custom function

Remember the default maintenance page that’s automatically set by WordPress when our website is under maintenance? you’ll put your WordPress in maintenance mode manually and customize the page with none additional plugins.

All you would like to try to to is to feature these lines of code at the top of your theme’s functions.php file.:

// Activate WordPress Maintenance Mode
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’);

Method 3 – Using .htaccess file

You can find .htaccess in your website’s directory. Simply rename your correct .htaccess file to .htaccess_default and make new file named .htaccess and add the subsequent code snippet:

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

You can contact us on our 24/7 WordPress customer support service number which is +91 7878 535 701. You can also write to us on info@lathiyasolutions.com.

About Author

WordPress Multi Lingual Plugin Support
Vijay Lathiya, the CEO and founder of Lathiya Solutions, is a passionate WordPress specialist dedicated to delivering innovative web solutions. With years of experience, he helps businesses build a strong online presence through custom websites that drive success.

Want to partner with the best software development company ?

Software Development
Scroll to Top