• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » How to create a custom maintenance page for WordPress

By Abhishek Ghosh April 16, 2011 2:20 pm Updated on October 17, 2014

How to create a custom maintenance page for WordPress

Advertisement

When you update your WordPress blog platform, or when you fix bugs on your WordPress theme , your blog becomes, or shall be inaccessible for some time. You obviously noted that WordPress shows “maintenancehtaccess mode activated” in the panel.

Worse if you perform a cleanup, it will take an hour or more.

Instead of losing visitors from search engine during this few seconds to minutes, you might want to redirect visitors to a page explaining that the blog website is undergoing maintenance and that would be accessible again soon.

Advertisement

---

It is true that there are Maintenance Mode plugin for WordPress that allows you to easily create a page where maintenance will be automatically directed to readers. This plugin works great, you can customize the maintenance message, announcing the return of the blog in X minutes, etc. except for major upgrade of WordPress when you have to disable all plugins to avoid major problems. We had to find another way to implement this maintenance page. After some research and unsuccessful attempts, we finally found a solution that works very well based on .htaccess with special maintenance page and a news page that announces maintenance.
 

The maintenance page

 

This page will be displayed on the browser that the visitor arriving at your blog for maintenance:
 

<?phpob_start();header('HTTP/1.1 503 Service Temporarily Unavailable');header('Status: 503 Service Temporarily Unavailable');header('Retry-After: 3600');header('X-Powered-By:');?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Blog is under maintenance</title><meta name="robots" content="none" /></head><body><!-- Your custom message --></body></html>

 
It uses the HTTP code 503 which means that the server is currently unavailable due to overloading or maintenance. Moreover, the code 503 is accompanied by another message indicating the robots not to index this page (content = “none”).
Just drop this file now “503.php” in the root of your web server.
 

.Htaccess special maintenance

 
This file is not to replace your present .htaccess, this is for special maintenance that will be activated at the time of maintenance. Name this file  as 503.htaccess, when you want to activate your maintenance, simply rename the existing .Htaccess to temporay.htaccess and 503.htaccess to .htaccess. More clearly: it activates one or the other of two files by renaming them.

Options +FollowSymLinksRewriteEngine OnRewriteBase /RewriteCond %{REMOTE_ADDR} !^ 123 \. 123 \. 123 \. 123RewriteCond %{REQUEST_URI} !^/503.php [NC]RewriteRule .* /503.php [L]

The 4th line should be modified according to your IP address for your blog is still accessible to you and only during maintenance.

And now, with these two small files you can update your blog quietly while preventing your readers that your blog will be back online after maintenance. This way you will avoid to submit a blog all broken and not working during this time.
Signature

Tagged With create wordpress maintenance page using custom html , customize maintenance wordpress , php create maintenance page , wordpress customize maintenance page , wordpress maintenance , wordpress maintenance page , wordpress maintenance page language:en

This Article Has Been Shared 653 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to create a custom maintenance page for WordPress

  • 9 types of articles to write in your blog

    When one writes a blog on a regular basis, one of the main challenges is to produce relevant content, unique and interesting to the readers, all this on a regular basis. Here are some ideas about what to write on.

  • 22 best blogging tips for beginners

    Here are the most important tips for budding bloggers covering writing plan, making money to search engine optimization.

  • WordPress hosting options : What must to look for

    WordPress hosting options are wide and varied. It becomes difficult to choose the best budget hosting company’s server to host your WordPress blog

  • Personal Life and your Professional Blog : How to Handle

    Personal Life and your Professional Blog might try to conflict at some point of time in a bloggers life. How to handle the situation?

  • Schema.org for WordPress : Advanced Tips for Genesis 2.0

    Schema.org for WordPress is nicely integrated by Genesis 2.0 but in terms of semantic complexity, it requires some advanced hand made tweaking.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Comments

  1. AvatarMax says

    January 18, 2012 at 4:59 pm

    Good idea. In this case, we simply took the site down for a few hours so a 503 probably wasn?t necessary. Great suggestion for longer cases though.

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (21K Followers)
  • Twitter (5.3k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Why Not to Use Your Host for Email Marketing March 5, 2021
  • What You Need to Know About the Microservices March 4, 2021
  • Fix Missing/Bad FileProvider for Freshchat (Android error code 354) March 3, 2021
  • Basics of Data Protection on the Internet March 2, 2021
  • What is Standard Software February 28, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "How to create a custom maintenance page for WordPress," in The Customize Windows, April 16, 2011, March 5, 2021, https://thecustomizewindows.com/2011/04/how-to-create-a-custom-maintenance-page-for-wordpress/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy