Secondary menu

Multiple Themes on your Drupal Install

nrussell's picture

Multiple Themes on your Drupal Install

Written by Nick Russell on

I was just encountered with the need to have a multi-site drupal install which utilized a specific theme for each site. In a lot of cases, multi-sites are set up on one drupal install, but utilize individual databases for each site. This is done by setting $db_url in settings.php to point to the database to be used for each site.

In our case, we needed to have a multi-site platform on one drupal install using only one database, but each site needed to display its own theme. This is accomplished by modifying each settings.php file for each site and un-commenting the following code.

<?php
# $conf = array(
#   'site_name' => 'My Drupal site',
#   'theme_default' => 'minnelli',
#   'anonymous' => 'Visitor',
# );

In our case, we only needed to set the 'theme_default' option for our settings and removed 'site_name' as well as 'anonymous'. Be sure to activate your themes in admin/build/themes by checking them On. This will allow you to set the 'theme_default' by specifying the theme name in each settings.php file.

Also, to keep with the "Drupal Way", make sure you place each theme for each site inside of a themes directory inside its site directory.

Example: sites/oneofmysites.com/themes/theme-directory

No Responses Yet
Add a Response