Sponsor:

A simple way to hide your wordpress website until launch.  

Posted at 11:05 am in Programming,Technology

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

Written by Anthony Damasco on March 24th, 2010 | 16 comments

16 Responses to 'A simple way to hide your wordpress website until launch.'

  1. 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.

    Affiliate Guidebook

    3 Apr 10 at 3:52 am

  2. 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. :)

    Kemberly Crampton

    5 Apr 10 at 10:04 am

  3. 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 :)

    Freddy Chango

    6 Apr 10 at 11:00 pm

  4. awesome stuff, cheers man

    Tommy Darwich

    12 Apr 10 at 12:56 pm

  5. Superb Post. then the simillar post I checked last Sunday on google. Keep up the great work.

    Kirby Xang

    13 Apr 10 at 10:48 pm

  6. RSS feed is not working in chrome, Kindly fix it.

    Regenia Langenfeld

    14 Apr 10 at 1:48 am

  7. neat stuff, cheers man

    Fernando Monholland

    14 Apr 10 at 3:01 pm

  8. Thanks, you guys explained everthing I needed to know and very quicly 10 out of 10!

    Margurite Purzycki

    15 Apr 10 at 1:39 pm

  9. Thanks for the post! I love it!

    Supernatural Online

    15 Apr 10 at 4:47 pm

  10. Very interesting site. Can you provide more information on this cheers?

    Carrie Chieng

    17 Apr 10 at 4:50 am

  11. I like the blog!

    Online Supernatural

    18 Apr 10 at 4:59 am

  12. 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.

    Simon Meyer

    18 Apr 10 at 4:23 pm

  13. 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.

    Kenton Kunkler

    22 Apr 10 at 6:55 am

  14. Kudos from one brainiac to another. :)

    Canal de Panama

    22 Apr 10 at 7:12 pm

  15. Thanks for the advice. Will put it to work. Tom

    Tom

    25 Jun 10 at 9:24 pm

  16. 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.

    Dillinger

    26 Aug 10 at 7:35 am

Leave a Reply


Facebook
Follow damasconet on Twitter