Daily Tip: Quick Way to Take Your WordPress Site Down For Maintenance Without a Plugin

June 14, 2010  | 
7 Comments

WordPress 3.0 is coming any minute now, which means many of you will be performing some major upgrades in the near future. Here’s a quick way to take your WordPress site down for maintenance while redirecting to your maintenance page. Add this to your .htaccess page:

RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteRule $ /maintenance.html [R=302,L]

Change maintenance.html to wherever you want to redirect your users. Also, update line 2 with your own IP address. This 302 redirect will ensure that search engines do not index your maintenance page as your new homepage.

Source: CatsWhoCode

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Easily integrate your WordPress site with Facebook

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

7 Responses to Daily Tip: Quick Way to Take Your WordPress Site Down For Maintenance Without a Plugin

  1. Thanks Sarah.

    Nice tip and in a really good time as I will be adding BuddyPress to a project I am working on. :-)

  2. Pingback: Daily Tip: Quick Way to Take Your WordPress Site Down For … « Wordpress for Business

  3. Pingback: fiddyp on "Maintenance Mode Plugin, is there any?" « Test Blog

  4. Pingback: Daily Tip: How to Turn on Maintenance Mode in WordPress - WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org

  5. Which one is better?

    ErrorDocument 503 /503.php
    #
    RewriteRule !^(503\.php$|images/|css/) – [R=503]
    #

    Header Set Retry-After: 3600

    or can I do it like this? I just copied yours and placed 503 instead.

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !/maintenance.html$
    RewriteCond %{REMOTE_ADDR} !^AAA\.BBB\.CCC\.DDD$
    RewriteRule /maintenance.html [R=503,L]

    They say 503 is better because of the ‘retry’ option. Anyway, whatever works is good. Thank you. :D

  6. oops, my bad! that is supposed to be like this: i hope the html entities show. :)

    <Files 503.php>
    Header Set Retry-After: 3600
    </Files>

  7. Hey Sara!

    If you go down this route you should be using a 503, that is a maintenance redirect.

    And yes, this is the simplest and best way of doing big changes hands down :)

    Take care, Z

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting