How to Put Your WordPress Site in Maintenance Mode?
When you are making some changes to your WordPress Site then your Website is in maintenance mode.
This maintenance mode allows you to display a formal or user-friendly message to the visitors, rather than a broken site. Usually, you can easily customize your WordPress Site without having to put it in a Maintenance Mode.
When You Need to Put Site in Maintenance Mode?
There are various reasons why you need to put your Site into Maintenance Mode. Usually, you can easily customize your WordPress Site without having to put it in a Maintenance Mode like You can work on minor changes, Update Plugins and Themes without any downtime or any embarrassing error.
There are two main reasons for using the Maintenance Mode:
1. When you need to change the WordPress theme or Customization of Theme.
2. When you need to fix a bug immediately, which could affect your site’s visitors.
If your website has a lot of traffic obviously, you don’t want your visitors to see your broken website because it creates the poor user experience. When you are making major changes on your site, it’s a good idea to place your site in a maintenance mode.
How to Enable WordPress Maintenance Mode?
You can put your site in the maintenance mode using various methods. I’ll show you with two methods that how to display the Maintenance Mode Page to your visitors.
Method 1) Plugins for Maintenance Mode
Various Plugins are available to display Maintenance Mode Page to your visitors. Here, we explain with two plugins that how to display Maintenance Mode Page with different features.
1. Minimal Coming Soon & Maintenance Mode
1. Upon activation, Go to Settings » Maintenance Mode to configure the plugin settings.
2. Enable the option Enable Maintenance Mode? to enable the maintenance mode.
You can also display the Contact Form to get in touch with your visitors.
This is your user-friendly Maintenance page.
2. Coming Soon Booster: Coming Soon Pages for WordPress
1. After activating the plugin, click on the Coming Soon Booster menu.
2. Go to Layout Design » Page Title.
3. It displays the default Page Title, You can Edit the Page Title which you wants to display to the users.
Set the Count Down Timer
If you are putting WordPress in coming soon mode or just want to let users know when your site will be up, then you can use a countdown timer module that’s included with the plugin.
This is your Coming Soon Booster Maintenance Mode Page as shown in the following screenshot.
Coming Soon Booster provides a feature of Newsletter which helps in getting touch with your users.
Method 2) Add Custom Code to display Maintenance Mode
If you want to display a Maintenance Page to the users without using the plugin Just add the following code in the functions.php file.
// Activate Maintenance Mode using Custom HTML function wp_maintenance_mode() { if (!current_user_can('edit_themes') || !is_user_logged_in()) { wp_die('<h1>Our Site is in Under Maintenance Mode. We are working on it! Check back later.</h1>'); } } add_action('get_header', 'wp_maintenance_mode');
Adding this code helps to put your site into Maintenance Mode like the following screenshot.
I hope this helped you to display the Maintenance Page to your Website Visitors.