So I have set up my localhost with MAMP and I don't want to muck about with Dynamic DNS or constantly editing my /etc/hosts file to be able to bring down Drupal sites from multisite installations on our company servers.
At work, we run a bunch of Drupal sites out of a single Drupal code-base (aka multisites). There are lots of domains, subdomains, etc. There's no problem at work for this, we've got it under control, but when I want to pull one of those sites down to my Macbook to do some playing, I have to do things a little differently.
In general, to set up multisites, you create directories like
, but without any DNS modification on localhost, to do multisites, I first symlink something to my drupal root
This will allow us to launch Drupal from http://localhost/newsite, but will pull files and settings.php from the
Then to use a different directory from
you create a multisite folder like
where your site specific settings.php, modules, themes, libraries, etc. will go. Then my new site is available at http://localhost/newsite which is great for local development.
But if I want to bring down a copy of http://inside.mysite.com for local testing, renaming the
is a pain because the system table, files table, and probably a bunch of others are expecting
in a lot of filepaths.
My savior is this core patch
which enables you to tell Drupal: "I know you want to find a subsite directory called
since that's what the path on the URL is, but resist the urge and use
Now, I access the site at http//localhost/inside_mysite but all of the settings and files are pulled from
This way, if I make changes, I can bring them back up to the server without much hassle.