If you have a basic Drupal web siteinstalled in the root directory on your webserver and you want to set up a new website in a subdirectory, with its own themes and module settings, here is how I do it.
Applies to Drupal 6.X:
- Back-up everything: your database (e.g., using the Drupal Backup and Migrate module) and your Drupal files.
- Create a folder on your local PC with a name something like /mysite.com.mynewsubsite. [note the weird syntax!]
- Using FTP, download the entire contents of your webserver's /sites/default directory into the directory you just created.
- In the settings.php file in the new directory, change the database prefix to something suitable for your subsite, for example:
$db_prefix = 'mynewsubsite_';
- Upload the whole /mysite.com.mynewsubsite directory (or whatever you have called it) to the webserver's /sites directory. You should now have a directory structure on your webserver that looks like this:
www.mysite.com/sites/default/
www.mysite.com/sites/mysite.com.mynewsubsite/
- Create a text file called makesymlink.php containing this text:
<?php
symlink(".", "newsubsite");
print "Done";
?> - Upload makesymlink.php to the root directory of your webserver.
- Run makesymlink.php by going to http://www.mysite.com/makesymlink.php in your browser. The script will run and "Done" should be displayed in your browser.
- Delete makesymlink.php from your webserver.
- Go to www.mysite.com/newsubsite/install.php in your browser.
- Now you can set up the new site.
Recent comments
1 year 10 weeks ago
1 year 18 weeks ago
1 year 21 weeks ago
1 year 22 weeks ago
1 year 24 weeks ago
1 year 25 weeks ago
1 year 26 weeks ago
1 year 27 weeks ago
1 year 29 weeks ago
1 year 31 weeks ago