If you’re developing a WordPress site, sometimes you may need to hide the site from your client or the general public until release.

There are 3 relatively quick and easy ways to do this :

1) WordPress Maintenance Plugin

This plugin adds a splash page to your blog that lets visitors know your blog is down for maintenance. Logged in administrators get full access to the blog including the front-end.  Useful for very quick messages, but not really great for completely custom frontpages.

My favourite plugin to do this currently is Minimal Coming Soon & Maintenance Mode – which you can find at WordPress.org.

2) Quick and Simple htaccess to a Holding Page (no images or included files)

Stick this in your .htaccess file in the root of your WordPress :

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/holding.html$
RewriteCond %{REMOTE_HOST} !^111\.111\.111\.111
RewriteRule $ /holding.html [R=302,L]

Replace 111.111.111.111 with your own IP address (whats my IP) to allow you access.

Replace the holding.html with the name of your holding page (keep it simple HTML)

Upload, done.

This method is a spit and sawdust way and doesn’t allow for images or scripts to be called (as everything is blocked apart from the html)

3) Advanced htaccess and Holding Page directory (images and scripts OK)

Create a directory in your document root directory named “maintenance”.  Upload your splash page and all linked files (images, css etc) in to it,  and then add the following to your htaccess file in the root of your WordPress :

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !99\.99\.99\.99 [OR]
RewriteCond %{REMOTE_ADDR} !88\.88\.88\.88 [OR]
RewriteCond %{REMOTE_ADDR} !77\.77\.77\.77
RewriteRule !^maintenance/ http://www.mydomain.com/maintenance/ [R=302,L]

Replace the 99.99.99.99 etc with your own IP address (whats my IP) to allow you access, and add more for the different locations you connect from.

What have you found to be most effective? Let me know.