[drupal-devel] Cleaner Directory structure

K B kbahey at gmail.com
Sun May 8 12:36:44 UTC 2005


There has been a discussion in the forums of having a cleaner
directory structure for Drupal.

Here http://drupal.org/node/22269#comment-38302

I said:

-- BEGIN

This will simplify upgrades and other things. It isolates Drupal in
its own directory, so other stuff can exist in their own directories.
All data files, image files, and other things have to be outside
drupal. Only additional modules, themes and settings.php files should
go under the Drupal directory. As a matter of fact, even local modules
and local themes, and even the sites directory can be located in its
own directory

For example:

public_html
- .htaccess
- index.php
- drupal/
- drupal-local/

Under drupal-local we have:
- drupal-local/sites/
- drupal-local/sites/site1.com/settings.php
- drupal-local/sites/site1.com/themes/
- drupal-local/sites/site1.com/modules/
- drupal-local/sites/site2.com/settings.php
- drupal-local/sites/site2.com/themes/
- drupal-local/sites/site2.com/modules/
- drupal-local/themes (themes shared by all sites)
- drupal-local/modules (modules available to all sites)

Drupal can search for drupal-local/ first for configuration files,
then search drupal/modules and drupal/themes for modules and themes,
then search drupal-local for modules and themes.

The "drupal" directory should contain the standard Drupal distribution
with no modifications whatsover, with instructions to move or copy the
.htaccess and index.php to the directory above, so local changes can
be merged on upgrades manually.

This way, upgrades will be much easier: everyone should leave the
drupal/ directory alone, and only mess with the drupal-local
directory.

-- END

What do other developers think of this? It will address one gripe that
people have, which is the difficulty of doing upgrades.



More information about the drupal-devel mailing list