There comes a time when you have to pause your regular website operations and put everything in maintenance mode, failure to do so may result in visitor irritation and confusion that can lead to many things, including bad reviews and general loss of a potential new customer. It’s simply good practice to take the necessary precautions for maintenance mode whenever you’re updating the design, the database, or doing other server side work that may hinder the user browsing experience on the front-end.

The other reason for using a maintenance mode is because you’re still actively developing your startup/website, but already have told a few people of the name/address of this new venture, this is when you might want to switch on maintenance mode, or otherwise known as the “Coming Soon” page, which works pretty much the same way. In this tutorial we are going to take a look at both reasons, and the techniques for getting these modes enabled on your sites.

Maintenance Mode with a external plugin

WordPress has a solution to pretty much anything these days, and that includes having several maintenance mode plugins available for free download.Doing a simple search on google you will find many plugins that offer this option.

Notice: We cannot guarantee functionality of all plugins because  the themes have specific settings that may conflict with your current setup of categories, plugins, javascript use, and more.


.htaccess Maintenance Mode

For this approach it is necessary to have permission to edit the .htaccess file which can be found in the root directory of your website. Once you have this file opened, copy and paste the following code:

RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.123
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ [R=307,L]

This code will redirect all web requests coming to your homepage to a maintenance.html file that you have to previously create, as you will be using it as a temporary homepage replacement. A simple Google search is going to return tons of maintenance mode templates, so that’s not an issue. Pay close attention to the %{REMOTE_ADDR} part, which is where you have to edit the numbers we put in, with the numbers of your IP address, as this will allow you to access the site no matter what.