views:

147

answers:

3

Hi Gang,

Up until this point in my career, I have usually modified my HOSTS file as the need to test a website before its DNS propagation or website launch occurred. This has worked well on in-house projects, but I'm finding the approach completely impractical when it comes to previewing my clients' websites to them before the sites go live.

The solutions that I use at the moment are as follows:

  • For strictly XHTML/CSS/Javascript projects, I simply set up a demo location, as the base URL of the website is not a big deal.
  • For WordPress/Wiki projects, I often find myself developing themes locally via WampServer, and then essentially having to recreate all of the database/site options all over again. This is why I use HOSTS files on my own projects, as I can dump all of the contents of my development database to my live database and the website is good to go.

So my question is about the best way of previewing a website to a client and/or switching from a development to a live state as quickly as possible. I do not want to have to retread over my steps two times (dev. phase and live site phase), but I also refuse to work on live versions of websites for the obvious reasons (I could accidentally the entire site).

Cheers,
Philip

+6  A: 

You should probably consider having a staging environment. You publish your work to that server and that server is public facing. You could then use headers to manage access. For our clients we have environments setup like this:

client.mycompany.com

and for each project we have:

project.client.mycompany.com

sometimes we even go to the extent of creating

projectv1.client.mycompany.com projectv2.client.mycompany.com

EDIT:

We dont usually have absolute paths in our applications unless it is a very unique situation. Since we only have a small number of instances where this happens we usually write the Production line of code and the debug line of code. we usually let the application decide whether it is in prod or debug mode; but could easily find where those changes need to happen before going live by using keywords and some time with the search and replace tool :)

Victor
Thank you. I actually do this, but one of my problems is that when I need to code absolute hrefs or other paths into a theme, there's no way to test if those links are accurate before going live. Your thoughts?
Philip Arthur Moore
+2  A: 

I personally use a demo url, and subdomains of that URL for client review on full implementations. So something like.

http://clienta.mydemourl.com

Typically it is then a breeze to move over and no DNS propagation delays and it works great if they still have an established site as we don't want to make any changes to that until after they approve. I do set a robots.txt file in with disallow all set to help avoid accidental indexing while on the temporary url.

Mitchel Sellers
+1  A: 

I would add that stopping anonymous access is a good idea too...

Joe R