How to create development site in subdirectory (rather than working on live site)?


I am working on my first website for an internet startup. To date, my partner and I have been viewing changes live on our website. The benefit of this way is that we’ve been able to exactly understand the experience of a user (including speed issues, browser compatibility, etc.).

However, as we are getting close to going out and recruiting clients and officially launching, I realize this is no longer a sustainable way of developing and working on the website. At any given moment, a page we are working on may not be working properly or look bad, and we don’t want others to see it. I am also concerned about privacy, at least before our launch, as we don’t want to risk our idea or content being stolen.

After a little bit of research, I believe we have generally 3 options: 1) work on website locally; 2) create a subdirectory on our domain for development; or 3) restrict access to all or most of our live pages.

I am not leaning towards working locally (e.g., with a program like Desktop Server) because my partner and I are on different computers & networks, and because I do think it is helpful to see immediately how changes look on the actual internet.

While restricting access (through a password prompt?) might be an adequate short-term solution, once we launch this obviously will not work.

This leaves the subdirectory method. I came across some references to this, but I do not quite understand how it works and have not found any detailed instructions on how to do this. Any advice or links would be appreciated!

Some basic info on my site:

  • WordPress
  • DreamPress (DreamHost WordPress VPS hosting)
  • Headway theme framework


Most just add the development sub-domain, and put a copy of the site there. You can also use .htaccess with this sub-domain to lock others out of that space (keeps nosy people, hackers and search engines out of the test site).

BUT… you mentioned DreamPress, and this method may not be available to you with that type of hosting. This then becomes an interesting question, because unless you have another type of hosting as well, like shared or VPS, there may not be a way for you to create a second test site.

Far and away, the best option is to set up a local WAMP/LAMP and do the work locally. It’s faster, safer, and causes far fewer headaches in the long run. If you are stuck in a Windows environment, you can use a complete stack such as uniserver, or, even better, install the free VirtualBox and run an instance of Debian in there which is the OS that DreamHost uses.