I'm setting up a simple web site for a member of my family, using wordpress as a CMS. I've already registered a domain name and I'm about to set up wordpress. I want them to be able to edit the site content online (using wordpress's admin interface) and view the site, but I don't want the site to be available to the public while it's in the editing stages.

Can anyone suggest a good way to prevent access to the public (for example a "coming soon" page, but access to the main site via a password; or perhaps put the wordpress installation in a subdirectory while the site is in the editing stages, and then use url rewriting to redirect the root directory to the subdirectory when the site goes live).

I should mention that I'm relatively new to wordpress, so if this kind of functionality is built in I apologise for asking the question.

6 Answers 6


I also have had problems with the maintenance plugins. What you can do instead (if you are familiar with HTML) is create a simple "Closed for Maintenance" page. Save the page as xindex.html. Upload the xindex.page to the same directory as your WordPress installation.

You Wordpress installation comes with two files index.html and index.php. While you are working or doing maintenance to your site, first rename the existing index.html file as realindex.html then rename the xindex.html that you uploaded as index.html. This will replace the Wordpress homepage with your maintenance page.

When you are finished working and are ready to display your site, reverse your steps. Rename the current index.html back to xindex.html and change realindex.html back to index.html. Sounds more complex than it is in practice, but it entirely avoids buggy plugins.

Here's a link to my maintenance page. You can copy the source. Closed for Maintenance

  • This looks like a good solution, and I'm going to implement it. If anyone can think of a reason not to use this method, please let me know.
    – Tomba
    Feb 14, 2011 at 17:15

If you know how to, just set up apache basic authentication - this will give you a little dialog box that asks for a username and password.

The main advantage is that you don't need to change your WP setup, and any authorised user can see the front end. Once you're ready, turn it off, and you're good to go

  • I did consider this, but since I don't have much of a wp setup at the moment, I'm not to worried about changing it.
    – Tomba
    Feb 14, 2011 at 17:16

There is number of plugins that show up maintenance pages, but I personally had trouble with that (plugin conflicted badly with something and almost knocked out server) and stay away from those since.

My personal preference is Members plugin, it has (among other things) easy to use private mode that will prompt for WordPress login to see anything on site.

I'd stay away from redirects for something simple, it is always better to develop as close to final URL structure as possible.

  • Thanks, I will look into the members plugin. Even if I don't use it in this case, it looks like a useful thing to know about.
    – Tomba
    Feb 14, 2011 at 17:15

or you can put this AS THE FIRST THING in your wp-config:

///////////////////////////////////////////--start, change before going live
//temporary IP-based redirect

//IPs: mine:go to whatismyip.com to find it

$allowedips = array("my.dev.ip.here");
$userip =$_SERVER['REMOTE_ADDR'];
if( !in_array($userip, $allowedips) )
    header('Location: http://cnn.com/');//or wherever you want

You could also simply enable the WordPress privacy setting to block search engines. If this is a new site with no links from other sites, nobody would be able to find it in the first place (unless they knew the specific URL). Admittedly, this isn't really "hiding" the content per se, since anyone can visit the site and see the content, but if people can't find it in the first place, that's kind of the same thing, right?

(The "Site Visibility" setting is under Settings > Privacy Settings.)

  • True. I will do this anyway.
    – Tomba
    Feb 15, 2011 at 8:54

Another simple answer is to write a "coming soon" page or whatever you want, and then name that file home.php. Drop this file into your theme and WordPress will automatically make this your home page. Your Wordpress pages are still accessible to anyone who knows the right URLs. When you're done setting up, just delete this file.

Note, this only works if you HAVEN'T set a static home page under Settings -> Reading.

I would also "hide" the site from search engines under Settings -> Privacy. WP reminds you that search engines are blocked, so just unblock after you're through constructing the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.