Multi-site Guidelines

Don'ts 

  • Don't Touch Core.
  • Don't add, alter or remove anything from sites/all
  • Don't alter sites.php

If you do one we may remove access rights to the document root.

Ok now on to the fun stuff...

In order to host many sites all sites need to be in a particular multi-site set up.

Building out the home site folder

The home folder of the site contains

  • the settings.php file for the site
  • any custom themes for the site
  • any custom modules required for the site
  • the files folder for the site

In multi-site the sites are all subfolders of the "sites" directory.

example:

{drupal_home}/sites/mysite.usf.edu

on the development environment  this ends up being:

/mnt/www/html/ucsfdev/docroot/sites/mysite.usf.edu

Configuring settings.php

Make sure the database line looks like:

$db_url = 'mysqli://username:password@localhost/databasename';

Then modify the end of the file to add the connection strings magic Acquia
created above:
something like:

require('/var/www/site-php/ucsf/emergency-settings.inc');

Themes required for the site

The following themes are available to all sites (since they are installed in sites/all)

  • rootcandy
  • zen
  • ucsf_technology

Custom themes with any customization should be in

 /sites/{mysite.ucsf.edu}/themes/custom/mytheme 

Contributed themes not on the above list should be kept in:

/sites/{mysite.ucsf.edu}/themes/contributed/somecommunitytheme

Modules required for the site

If a module isn't on our current standard list it will need to be added to the subsite.

Custom modules should be in:

/sites/{mysite.ucsf.edu}/modules/custom/mymodule

Contributed themes not on the above list should be kept in:

/sites/{mysite.ucsf.edu}/modules/contributed/somecommunitymodule

Files Folder

The files folder needs to be in the subsite.

Do not check the file folder into version control. 

It needs to be manually uploaded to the server. See deploying a site to the Acquia Cloud page.