[drupal-devel] Cleaner Directory structure

vlado vlado at dikini.net
Tue May 10 09:50:08 UTC 2005

> This way, the index.php is in the public_html directory of the
> account, and .htaccess affects how it works.
> > Custom (non-distribution) unix install:
> > (in /usr/local)
> > 
> > lib/drupal  -  equivalent to core above
> > var/drupal  -  equivalent to local above
> > 
> > var/www/drupal/sites/example.com/files - this is configurable anyway
> > 
> > lib|var/drupal are not in the web-server's display paths, this
> > potentially makes sharing the same web-server location with other
> > apps easier

What I am suggesting is a small change like the one at the end of this
email. It will give the opportunity to maintain all or modst of the
scenarios described so far, and will make drupal more packageable by the
distributions, as . The downside is that it will require a central
configuration file ( put in /etc/drupal ;) 

This suggestion should not have any performance implications, as far as 
I am aware, apart from the loading of the configuration file, let's be

I wouldn't argue with any default directory scheme suggested, I like the
current one myself, as long as it is trivial (read standard and
configurable) for an admin to set up the directory structure they like,
and drupal is packageable without modifications bar config by debian.

Be flexible if it doesn't hurt you.

Cheers, Vlado

========================== this should go in the configuration file
//Linux FHS
$drupal_core = '/usr/lib/drupal'   //core
$drupal_sites  = /var/lib/drupal //local path, private uploads go under 
                                 //this one[advisory]
//One of the proposed 'clean' structures
$drupal_core = "$webroot/core"   //core
$drupal_sites  = "$webroot/local" //local path

//crurrent head structure
$drupal_core = "$webroot/core"   //core
$drupal_sites  = "$webroot/local" //local path

$drupal_core = $webroot           //core
$drupal_sites  = "$webroot/sites" //local path

$www_root = /var/www             //illustration, could get it from the 
$www_root = $webroot             //illustration, could get it from the
                                 //index.php path, 

$drupal_conf =/etc/drupal        //core configuration

========================== illustration only, the changes need to be
========================== done in conf_init()
foreach (array("$sites/$config/$dir/$file",
"$sites/$config/$dir/$name/$file", "$core/$dir/$file",
"$core/$dir/$name/$file") as $file) {
  if (file_exists($file)) {
    $files[$type][$name] = $file;

More information about the drupal-devel mailing list