Another wow, I am so on the edge of my seat watching this website manifest. You are good at creating excitement, exactly what we want, thanks Tina you make it fun. I am truly inspired with what you have done, I love to witness brilliance.
How to: Drupal Multisite on Windows Localhost
Goal
Setup test/development environment for Drupal on local Windows computer.
Strategy
Keep original clean Drupal installation, then create many test/client sites, such as:
sites/defaut
sites/site1
sites/site2
sites/dev.mysite.com
If site1 doesn’t work, delete site1 folder. No need to re-install Drupal nor all contributed modules, since default installation remains intact and contributed modules are still in sites/all/modules.
To avoid path and redirect problems, name your sites/ folders as peers of your domain:
sites/dev.adastra.ca
sites/adastra.ca
1. Install WAMP
Quicklink:
2. Create Databases
- Make sure Apache and MySQL services are running.
- Launch phpMyAdmin via /phpmyadmin/ or WampServer icon in system tray.
- Create base database: drupal6 (leave parameters as default - user: root, no password)
- Create other databases: site1 and site2.
3. Install Drupal
- Unzip Drupal 6 into c:\wamp\www\drupal6 folder.
- Go to http://drupal6 and follow installation instructions.
4. Create Multi-side Folders
- Copy /sites/default content to /sites/site1.
- Open /sites/site1/settings.php and set $db_url to:
$db_url = 'mysql://root@localhost/site1';
- Also, in settings.php uncomment and set $base_url to:
$base_url = 'http://site1'; // NO trailing slash!
- Note: Close settings.php so you can proceed with step #9. If applicable, delete default.settings.php from /sites/site1
- Repeat Step 4 for site2 and other sites.
5. Enable Virtual Host
- Open C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf in Notepad (insert your Apache version number instead of 2.2.11).
- Remove the
#beforeInclude conf/extra/httpd-vhosts.conf, as follows:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
6. Add Virtual Host
- Open C:\wamp\bin\apache\Apache2.2.11\conf\extra\httpd-vhosts.conf in Notepad and add these lines at end of file:
<VirtualHost *:80>
DocumentRoot c:/wamp/www/drupal6
ServerName site1
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/wamp/www/drupal6
ServerName site2
</VirtualHost>
<VirtualHost *:80>
DocumentRoot c:/wamp/www
ServerName localhost
</VirtualHost>
7. Map Virtual Host
- Open C:/Windows/System32/drivers/etc/hosts in Notepad and add these lines after
127.0.0.1 localhost, as follows:
127.0.0.1 localhost127.0.0.1 site1127.0.0.1 site2
8. Restart Apache
- Save all changed files.
- Select WampServer icon in system tray > "Restart all services".
- Note: If you receive a white screen with "Forbidden Access" error message, "Restart all services" again.
9. Install Multiple Drupal Sites
- Go to:
http://site1/install.phpandhttp://site2/install.phpto install the sites. - Go to:
http://site1andhttp://site2to view your multi-site installations.
Modules/Themes Location
- To share modules/themes between all sites, store them in sites/all/modules and sites/all/themes respectively.
- To make modules/themes available only to one site, store them in sites/site1/modules and sites/site2/themes respectively.
Import Database Larger than 2MB
If you are importing an existing database that is larger than 2MB, you can use the WAMP menu to navigate to PHP > php.ini. In php.ini, increase the upload_max_filesize to:
upload_max_filesize = 8M
Note: Remember to set it back to default of 2MB after import.
Share this



I believe in the greatness in people. When I chose Doctors Without Borders over Chase Bank and UNICEF over The NY Times, I believed in people's potential to enhance the quality of life of others, thousands of others. This is why I do what I do. I use
Comments