I've been working for a few years on a project for a friend of mine, and it has slowly grown into a large website. In the early stages, I just did development on my local machine with a local database, then deployed any site and database changes to the live site.

This worked well for a while, but lately we've been having issues with deployment. We'd like to set up a staging environment for testing before we deploy to the production environment.

The site I'm using for hosting doesn't offer a staging environment for the site, so I was wondering what I can do to get a staging environment set up. If my site is www.mysite.com, can I use staging.mysite.com, or do I need to purchase another domain?

I'm curious as to how other people handle this...

Comments

i normally use mysite.local for local development and mysite.staging for, staging. Depending on who needs to access local and staging, its enough to maintain local dns or a hosts-file to view the different websites.

Accepted Answer

Not sure this is an SO question but in case it is:

  • It would depend on the services offered by your web host, some offer sub-domains, for a price
  • You could also deploy to a sub-folder, eg www.mysite.com/staging
  • Purchase another (cheaper?) hosting plan, eg www.mystagingsite.com
  • If you don't need public access, just deploy to another local machine, either physical or virtual
Written by AUSteve
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki