You are here

3 March 2012
How I set up my multi-site in localhost so that my different sites would be in different sub-folders. I did it on my windows machine.
At first I Downloaded Drupal and placed it in my htdocs folder. Root directory of localhost. Like I would do with any Drupal installation.
I want the default installation to be my default set-up so that if I need another site I simply copy that one. It already works like that, so I install my Drupal site.

So basically I did these simple four steps:
1. I duplicated sites/default folder and named it localhost.test.

2. Then I duplicated my default database and also changed database name from settings.php.

3. Then I duplicated sites/example.sites.php and named it to sites.php. I also added this code there.
Source code viewer
  1. <?php
  2. $sites['localhost.test'] = 'localhost/test';
Programming Language: PHP

4. Then I made symlink to it. Don't forget to run cmd as Administrator.
Source code viewer
  1. mklink /J C:\xampp\htdocs\test C:\xampp\htdocs
Programming Language: Bash