Installing modules

If you want to use a core module, you simply need to ensure it is enabled.

If you want to use a contributed module, you first need to install it.

The installation procedure for a contributed module can vary, so check with the module documentation. However, most modules can be installed by a simple file copy, as descibed here.

Downloading the module

You will first need to obtain a copy of the module you wish to install. In most cases this means downloading it from drupal.org, or some other site.

Make sure you get the correct version. If you are using Drupal 6 you will need to get the 6.x version. The 5.x version will not work with Drupal 6. If you find a module which has a 5.x version but no 6.x version, check the documentation or forums on drupal.org. It might be:

  • The module is obsolete. There will usually be a recommendation for an alternative module to use instead.
  • Version 6.x of the module is still being developed.
  • The module has been abandoned. You will need to find an alternative (or adopt the module yourself).

A module will normally arrive as an archive file (most likely a tar.gz file). You must extract it to locally before installing it.

A module archive usually consists of a single folder full of files. The Pathauto module (which we will use in the next section) has a folder called “pathauto” which contains all the module's files.

Installing the module

Drupal expects modules to be installed in the folder:

/sites/all/modules

directly under the drupal root. The module folder should be added directly under this location, so for pathauto you would have:

/sites/all/modules/pathauto

with the modules actual files inside the pathauto folder.

Note the /sites/all folder will already exist in a standard Drupal installation, but the modules folder will not exist. The first time you install a module you must create it.

Enabling the module

Enable the module exactly as we did previously. The new module should show up in the list of modules, if you have installed it correctly.

Core modules

Drupal's core modules are found under:

/modules

directly under the Drupal root folder. You could put extra modules in this folder – it would probably work, but it is not recommended. It is better to keep the standard Drupal folders clean, and keep all additional files in the /sites area. This will avoid any problems when upgrading Drupal.