May 2, 2010

Where to Install Modules

There are thousands of contributed modules. For many people, it is unlikely to build a drupal website without installing contributed modules.

A common mistake a drupal newbie makes is installing the contributed modules in the modules directory found within drupal root. This mistake make future upgrading very cumbersome: You have to find out which modules are drupal system module, which are installed by yourself.      

The right way to install modules is to install them in the sites directory. You can install the module any of the following:

 drupal\sites\default\modules\
 drupal\sites\all\modules\
 drupal\sites\mysite.com\modules\

If you copy the module files to one of the first two directories, the module will be accessible to all sites(if you install multi-sites using one drupal installation). If you copy the module files to the folder of "drupal\sites\mysite.com\modules\", then the module is only accessible to the site mysite.com.

When upgrading your drupal(this is a very frequent task if you want to ensure your site safety), you need only to backup the sites directory and copy all the contents to new drupal installations.

No comments:

Post a Comment