Multiple Environments on a Shared Host

Environments

Every good Drupal developer should be familiar with Dev, Staging, and Production environments.  Dev is where you test your code to make sure it won't break anything, Staging is where content is added (so users won't see a site being built before their eyes,) and Production is the live-to-the-world site.  In theory, you could get by with just two environments, especially once the site is live, but it never hurts to have extra test cases before pushing code live.

High-end hosts, such as Acquia and Pantheon, have a pretty slick online interface for moving your code from Dev to Staging to Production.  There is no way you can bypass Dev, so you making sure that your code is identical in all environments, which is a very good thing.  Unfortunately, we won't have that functionality with the setup we are using on ASO, but we can still have our multiple environments.

Create the Subdomains

First, you will need to create the URLs for the Dev and Staging environments.  These will be something along the lines of dev.lowgravitystudios.com and staging.lowgravitystudios.com.  You can do this through cPanel by going to Subdomains.

CPanel domains group with subdomain link highlighted

Then enter the name of the subdomain and select the domain (if applicable.)  By default, a document root will be generated, which you may edit if you want (I'd just leave it as-is.)

CPanel create subdomain

Once you have created the subdomains, you should be able to go them (e.g. staging.lowgravitystudios.com) and you will get an empty directory listing.