[Advanced] So you’re planning to launch a new blog but don’t want to reveal it to anyone quite yet, for a variety of reasons. You want to be able to view individual posts as they would normally appear, but neither want them indexed nor visible to anyone. Or you want to test some themes on an existing blog without your visitors having to see.
There are a few ways to accomplish either, and it’s relatively easy. Just make sure you take precautions to back up your existing blog and database. (I’ve wiped out a few sites. Fortunately, they never had more than about 9 posts, and could be fixed manually.)
Subdomain Method for Existing Blogs
This method is useful for testing changes to a blog that already exists. It amounts to creating a test blog on a subdomain. Your hosting account must allow you to not only set up a subdomain for your, but also access the existing database. You should know that many hosts do not allow this. And as I’ve only tested on WordPress this method may not work for you on other blog platforms.
- Create a subdomain. So if your blog is at http://www.myblogdomain.com/, then create something like test.myblogdomain.com. You’ll need to do this in your hosting control panel, not your blog platform control panel.
- Install your blog platform on the subdomain. If you have “one-click” blog setup through your host, just make sure that you specify the subdomain during installation, else you may wipe out your existing blog.
- Tweak the test blog’s configuration to access the real blog’s database. If your hosting provider does not allow this, you will need to backup the main database and import into the test database.
- Turn off access to your test blog to search engine bots. Newer versions of WordPress have a “privacy” setting. For older versions, look under the “Writing” options of “Options” and get rid of the entries in the “Update Services” section that “ping” one or more blog pinging services. For other blog platforms, you will have to look for something similar.
- Make your changes and test them. No one will know that the test blog exists, provide you don’t click on any links to either the main blog nor outside your domain. Also make sure not to change the database or you may affect the main blog. (That is, if the test blog is accessing the original database.)
- When you’re done, just get rid of the test blog and apply changes to the main blog, if desired. Just make sure you don’t get over-zealous and delete the wrong database. [I would highly recommend backing up the main blog’s database before starting this process.]
This method is good for when you have an existing blog and want to test a few themes and plugins before going live. But what if you want to launch a new blog and don’t want anyone to see any of the content until you’re done tweaking?
Hide Your Home Page Method
This method is ideal for a new blog. No one knows your URL yet, and posts and pages are not indexed.
Last year, I came across a WordPress plugin that disallows access to the home page, unless you are an admin. However, I never managed to get it to work, as simple as it was. My method requires no plugin, but does require a bit of code tweaking. The general essence of it is to tweak your theme’s main page code. What you’ll do depends on both your specific theme and your blogging platform. My specific instructions will be for WordPress’ “default” theme, for simplicity. Here is the general procedure:
Whether your theme uses a single template file for rendering the home page, post (permalink) pages, and archive pages, the process is the same. Note that for most themes I’ve tried (a good several dozen), all had a different template file for “page” pages. (That’s “pages” in the blog sense, where the page is not part of the reverse chronological bunch of post pages.)
- Backup your theme’s files.
- Tweak your home page’s template file.
- In WordPress, that file is called index.php but in your WP panel’s Theme Editor, it may be labelled something like “Main index”. Select that file for editing. and look for the conditional code that determines whether the URL being rendered is the home page, a post (permalink) page, or an archive page. [Not a “Page” page, though.] Note that even if you have a theme that uses a separate template file for the home page than for post pages, the process is the same.
- In the conditional code of the template file that checks whether the URL being rendered is the home page, remove any code that displays post content.
- Replace that code with a message or graphic stating that the blog is “in beta” or whatever you like.
- Remove all links in the sidebar template(s).
- Remove any advertising in all templates, in case having ads on pages with no content violates some network’s TOS.
- Turn on the privacy setting to block search engines. In some blog platforms, you may need to disable the “ping” settings. That way, when you post a new article, the URL will not be sent out to various blog pinging services. If that happens, then your whole effort is pointless.
- Tweak themes and plugins, add new content. You’ll be able to access specific posts and pages from your blog platform’s control panel. However, if you try to view the home page, it’ll be blank except for your message.
- When you’re ready to go live, just replace the template files with your backup copy. Remember to turn off privacy settings and add any pinging services you want to access.
There’s generally no need to do anything to the “page” template because it will not affect the home page. We also don’t need to do anything to the post template, only the code that renders the home page.
Keep in mind that both methods above fall apart if you click on any link to an URL outside your domain, since those sites could have a list of referring URLs. This of course exposes your otherwise hidden blog