A simple way to hide your wordpress website until launch.
Recently I had to revamp a website for a client. The website was using Word Press to power it and so I had to do some template editing that would make the website look very broken while I was experimenting. What I did was stop Word Press from running at all unless a get request happened.
To do this you must first find “index.php” in the root folder on your blog. It should look empty aside from loading the blog header. Then you paste in this code:
<?php
$display = $_GET['display'];if ($display !== “yes”) {
echo ‘Post a polite message letting the user know that the site is being worked on, you may use HTML in this space’;
exit();
}?>
After saving and uploading your modified index page, you will only see the message that you are echoing. If you want to see the wordpress blog you need to include ?display=yes at the end of your URL.
example: http://mysite.com/blog/?display=yes
Now you are free to experiment with the CSS without worrying about any users seeing the website break. If you have any questions about this, ask them in the comments.
-AD
16 Responses to 'A simple way to hide your wordpress website until launch.'
-
I’ve just stumbled upon your site while searching for a tutorial on an related subject. Glad I did too. There’s a lot I like. Anyway, you’ve been bookmarked and I’ll be back soon.
-
Hey, I am checking this site from my iPhone and it looks kinda funky. Thought you’d want to know. It’s a great post though, didn’t mess that up
-
awesome stuff, cheers man
-
Superb Post. then the simillar post I checked last Sunday on google. Keep up the great work.
-
RSS feed is not working in chrome, Kindly fix it.
-
neat stuff, cheers man
-
Thanks, you guys explained everthing I needed to know and very quicly 10 out of 10!
-
Thanks for the post! I love it!
-
Very interesting site. Can you provide more information on this cheers?
-
I like the blog!
-
Hey! I have been following your blog for 4 days now and i should say i am starting to like your posts.I guess im subscribing now for not missing anything new.
-
I find your website very amusing. I love coming back to it each day to read additional content. Your site has been one of my favorite ones for the last few weeks and I would love to become a full time subscriber. I hope your content keeps going the way it is, and I will participate in many discussions if given the opportunity.
-
Kudos from one brainiac to another.
-
Thanks for the advice. Will put it to work. Tom
-
If though, you have an index.html and index.php (in other words keeping the old site going pre launch) would Google pick up index.php at all? Or would this need a rewrite?
Anyway I will try it and see. Thanks a lot for sharing this.




I just needed to take a moment and let you know that I’ve been relishing reading your posts over the last few weeks. I have a blog of my own, and would love to switch links with you. If you’re interested just leave me a comment on my page or send me an e-mail with your details.