Created on 18 Oct 2012 ;    Modified on 29 Sep 2013 ;    Translationitalian

Installing a module in Drupal 7


One of the strengths of Drupal is the great availability of modules to extend its functionality.

But how to install a module?

It isn't a complex operation, especially if you have the opportunity to work with a command shell on the server where the system is installed.


Suppose you have the following structure on the server file system:

Directory contains
/Webroot is the root from which to store the contents of the WEB server
/Webroot/drupal_location is the directory where you installed drupal, say with a multisite installation
/Webroot/drupal_location/sites from here to the content of the sites served by drupal
/Webroot/drupal_location/sites/all and this directory contains the accessories available to all sites in Drupal
/Webroot/drupal_location/sites/all/themes from here we will have issues additiona , or those who will install us, over the topics already included in the code of Drupal
/Webroot/drupal_location/sites/all/modules from here the modules additional, also in this case those that will install us
/Webroot/drupal_location/sites/all/libraries finally here libraries additional

Of course the items /webroot and /webroot/drupal_location are an example, so they will be different on your server.

File system structure downside of /webroot/drupal_location is built by Drupal installation. For this reason it will match with the directory names indicated in the previous example.

How to do

When we have identified an interesting module, in the section Download copy the link to the needed file. For example, the module Pathologic has the aforesaid section similar to the following:


Recomended releases

Version Download Dates Links
7.x-2.4 tar.gz (16.81 KB) ... 2012-Oct-06 Notes
6.x-3.4 tar.gz (8.95 KB) ... 2010-Dec-05 Notes
  1. From the Download column in the table, copy the link to the file tar.gz.
  2. Connect with the server and go to /webroot
  3. Let's download the tar.gz
  4. extract the tar.gz
  5. and move its directory to /webroot/drupal_location/sites/all/ modules

Once made the connection (in command shell) to the server, the procedure above will be:


2.# cd /webroot
3.# wget
17/10/2012 21:47:38 (97.1 KB / s) - "pathologic-7.x-2.4.tar.gz 'saved [17210/17210]
4.# tar xvfz pathologic-7.x-2.4.tar.gz
5.1.# cd Drupal_location/sites/all/ modules
5.2.# mv /webroot/pathologic .


That's all folk. Now we have to connect in the site as an administrator using the Drupal WEB UI[^1], enable the module loaded, and, if necessary, configure the permissions to use.

A recommendation

Having so many modules available it is a plus for those who must implement a new site.

But I recommend to choose them using a lot of caution. More modules are installed in your site, more work you'll do to maintenance for updates. So: choose only what you really need.


  1. WEB User Interface.