How to Enable WordPress Maintenance Mode?

The WordPress Maintenance mode page can be set up when updating the WordPress core, plugins, or themes and when performing other maintenance tasks such as database optimization or security updates. Users with the correct permission can access the site, but those without them are presented with the maintenance message.

You have to set up a maintenance page to inform the visitors that your site is currently unavailable and when it will be live again.

Here are three ways to set your WordPress website into maintenance mode.

1. Add customer code to the functions.php file

To set maintenance mode, you can add code to your functions.php file. For that, locate the functions.php file from your current theme directory.

You can also add this code directly from your WordPress dashboard by editing the code in your Theme File Editor option.

Add the above code to your functional.php file to set redirection on Maintenance mode.

2. Add code in the .htaccess file

To redirect all pages to maintenance, you can add the code to the .htaccess file for setting redirection.

In this option, you must set the maintenance.html page first; after that, you must add the code below to the .htaccess file.

After adding this code, save your changes to set maintenance mode on your website pages.

3. With the help of a plugin

If you are unfamiliar with coding, you can choose this option. You have to install and activate any maintenance mode plugin.

First, go to the WordPress dashboard and navigate to the plugin option; click on Add New, and search for "Maintenance" in the search bar.

After installing and activating the plugin, you can see that your website is set to maintenance mode. It will also allow you to set up your customer page and exclude pages from this maintenance mode.

After updating your website, deactivate the plugin, and the maintenance mode will automatically be removed.

There are many other WordPress plugins, Like under Construction, WP maintenance mode, Comming soon page, etc., that you can use for setting maintenance mode.

Conclusion:

Select the option that best suits your needs and preferences, whether using the WordPress plugin, a .htaccess file, or modifying the functions.php file. Setting up a maintenance mode or "Coming Soon" page is a great way to notify your visitors that your site is undergoing maintenance or that a new page or post will be available soon.

This could help you manage your visitors' expectations and prevent them from seeing broken or incomplete pages while changes are being made. So, try creating a "Comming soon" page next time before updating or launching your site.



Was this answer helpful?

« Back

chat