How to Enable Maintenance Mode in WordPress

What is Maintenance Mode?

Sometimes when your website constantly has traffic flowing in while doing system upgrades. The maintenance mode can become handy to temporarily closed down your website. It’s always a better practice to put your website under maintenance mode to prevent your customers experiencing a broken website.

When to use Maintenance Mode?

The ideal situation to use maintenance mode in WordPress is when you want to perform any upgrades to your website such as testing new plugins or themes, fixing bugs or changing the design.

How to Put your WordPress into a Maintenance Mode?

There are several ways to put your WordPress into maintenance mode. In this article, we will start from the easy to difficult. For high traffic site we highly recommend to use method number three.

Method #1 –  Plugin Method

For the plugin method, Coming Soon Page & Maintenance Mode by SeedProd seems to be the most functional plugin.

It simply helps you create coming soon and maintenance page without any coding required.

Features

  • It works with any themes and repsonsive.
  • Customziable looks and feels
  • Support custom CSS and HTML
  • Support multi-languages translation
  • BuddyPress Support

Pro Features (Paid Version)

  • Support custom fonts from Google and Typekit
  • Automatic Screenshot
  • SEO Optimized
  • Secret links for giving access to view th website without logging in.
  • Full backgrounds option
  • Much more.

Method #2 – WordPress Built-in Maintenance Mode Method

WordPress has a built-in maintenance mode feature that you could simply turn on by adding a file caled .maintenance to WordPress root directory.

Normally the file is automatically created when WordPress is upgrading themes or plugins and it will be removed once the process over. However, sometimes WordPress can stuck in maintenance mode and you can easily fix that by follow this guide.

In .maintenance file you could add any custom notice message and even style it will CSS.

Method #3 – Use .htaccess file

The htaccess method will redirects every requests including images and direct IP access to a specific file. In the example we’re redirecting the traffic to undermaintenance.html file which you can create an empty file and put a notice message.

  1. Create a new file undermaintenance.html save and upload to your public directory.
  2. Type in maintenance message into the file (undermaintenance.html).
  3. Open .htaccess file located in your WordPress root directory.
  4. Add the code below continue form the last line.
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
    RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
    RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
    RewriteRule .* /undermaintenance.html [R=503,L]
</IfModule>

If you did it correctly, the website will respond you with a 503 page which means website is temporary under maintenance. We highly recommend to put an estimate maintenance time when the website will be live so your customers know when to come back.

Share this content!
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •