How to create multi sites
If the only purpose is to have a a dev/test/live environment, you should just go with a service like Pantheon which provides all of those for you with an ease of maintenance.

If you want to host it yourself, here's the gist of what you do...


Make sure you only have one Drupal root. Can't stress this enough. If possible, also be on version control (git) as this will help immensely.
Create 4 separate MySQL databases. Would go with a naming convention of like CODE_dev, CODE_test, etc.
Inside of your sites directory, create 4 directories, each with their own settings.php and files directory. You can name them whatever, just keep it consistent for ease of use. ie, dev.example, test.example, etc. Add their database credentials to their settings file.
In your sites directory, you will create a file called sites.php. In there, you will assign a directory name to a URL. So if you used dev.example as the name of your development site directory, and your subdirectory URL looks like dev.example.com, the format will look like this:

$sites['dev.example.com'] = 'dev.example';

Do that for each directory/site.
In your registrar for your DNS settings, point all of the subdirectories to the same IP or path as the top level domain (example.com), which should be the Drupal root directory. From there, Drupal will take care of the rest.


I think that's it, but anyone feel free to correct me. As far as the themes go, put it in sites/all/themes so all sites will have access to them. If you want a site to only have access to a specific theme/module, put it in THAT site folder. 

For example: sites/dev.example/themes/THEMENAME