I am Drupal newbie taking over a poorly documented D6 group of sites organized by sub-domains. In examining the dev.[domain].org/sites/ folder I discover folders: all, default, demo.[domain].org and [customer].[domain].org and each folder has its own settings.php?

For example, /default/settings.php allows me to configure-or-edit the 'site_name' => and $db_url and $base_url. The $db_url works.

while, /all/settings.php has a disabled # $base_url and a disabled # 'site_name' => yet an active $db_url that is connecting to a 'mysql://[detail]' that may or may not be an active db.

I presume folders demo.[domain].org and [customer].[domain].org in the /sites/ folder are just legacy folders left by the previous coder/hacker of the settings.php used in the those sub-domains.

Your thoughts and answers will be gratefully consumed.

Thank you, Steve

  • 3
    Please ask one question a time. Also, have you read documentation about your case: drupal.org/documentation/install/multi-site ? Probably you will discover some irregularities and need to ask about them, but at least it will cover basics. – Mołot Jul 10 '14 at 13:30

Refer the multisite doc as Molot suggested. We don't know how your site(s) have set up, so you have to experiment it yourself.

Q1: Why isn't there just one settings.php per sub-domain site?

There is. sub.example.com site's settings.php file is sites/sub.example.com/settings.php. The reason to have a whole folder is to make it possible for you to store files, modules, themes and libraries separately (sites/sub.example.com/modules will be only available to sub.example.com likewise.)

Q2: What is the difference between /default/settings.php and /all/settings.php?

You should not have a settings.php file in sites/all folder. That folder is a special one that is used to store common files across all the sites, and the default modules/themes/libraries folder for the only site if it's not a multisite.

Q3: And why are folders demo.[domain].org and [customer].[domain].org in the /sites/ folder? Perhaps they are just legacy folders left by the previous coder/hacker of the settings.php used in the those sub-domains.

If there are demo.example.com site, that site is probably using the settings.php inside to load the settings. You can however change this in the sites/sites.php file. Unless you override, demo.example.com site is using sites/demo.example.com/settings.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.