Adding Modules and Themes

Last modified: June 8, 2009 - 23:58

Just a note: Before deciding to install and/or enable extra modules on your site, it is recommended that you first consider the intended functionality for your site, and only add new modules if your site actually needs them. Enabling modules that your site doesn't need adds to the memory and other resource needs of your site unecessarily, and will make your site's pages load slower. Because a module is popular or someone tells you that 'every site needs it' doesn't mean yours does. There are good sites that have been built with absolutely no contributed modules at all.

Also, it is recommended that you work on content, functionality, and configuration of your site before you consider how it should look (the theme), since that decision can be made later and may detract from your thinking about functionality and content.

Themes are largely a matter of taste. For example, many people do not like to use a "fixed width" theme, but lots of people do. One nice thing about themes are they are pretty much independent of your content so you can switch them when you want. Caution, though, there are parts of your site (blocks, for example) that get built based on the theme, so switching themes can leave junk lying around to slow down your site.

Contributed modules are ways to add or extend functionality of your site. The only module I, personally, consider necessary is the Nodewords (a.k.a Meta Tags) module; in my opinion, it should be promoted to "core" status. This one allows you to add the "content," "keywords," and "robots" meta tags to your pages. This is useful if you're interested in your search engine rankings. You will also find that many contributed modules also require the Views module; I go ahead and make that a standard one for my sites.

Now, if you experiment with different themes and modules, as I know you will, despite my suggestions, you should also look at the Update Status (core in D6) and Site Documentation modules to make sure you are current and to document and clean up the mess your experimentation will make. Here are some suggestions on choosing the release: Strong stomach?

For examples of different opinions on what are "must have" modules, here is one, and here is another.

Installation

Installing a module or theme is pretty much the same until you get to enabling them. Now keep in mind that I use a Windows based PC (development) and Linux servers (on my live sites).

  1. Go to the Drupal site and click on the "Downloads" tab. Then select either "Modules" or "Themes" depending on what you're after.
  2. Locate the module or theme you want.
  3. Make sure there is a version for the version of Drupal that you are using. D5 modules and themes will not work on D6.
  4. I always click on "Find out more" and read the stuff again. This gives you the chance to see if there is support for your release of Drupal. You can also look at pending bugs and feature requests - it might change your mind.
  5. Download the proper release. (I put them in a Drupal folder in "My Downloads.")
  6. Unzip the downloaded file (I use WinZip). It may tell you that there is only one file in the zipped file; click "yes" or "OK."
  7. Extract the code to to your /sites/{sitename}/modules/{modulename} or sites/{sitename}/themes/{themename} folder. If you are not running multiple sites, this would be /sites/all/modules/ or /sites/all/themes/.
  8. That's it! Now you need to enable it.

You should end up with a folder structure something like:
screenshot of a mock-up files folder layout

For advanced users

If you have access to a Unix shell (e.g. SSH), the following series of commands will download and extract the files directly to your server.

Before you start, use the pwd (print working directory) command to confirm that you are in the correct directory (e.g. modules). If not, use the ls (list directory) and cd (change directory) commands to navigate to the correct directory.

Steps:
  1. Step Download Archive:
    wget http://copy_and_paste_archive_url/sitedoc-5.x-1.x-dev.tar.gz
  2. Step Uncompress Archive: tar zxvf sitedoc-5.x-1.x-dev.tar.gz
  3. Step Delete/Remove Archive: rm sitedoc-5.x-1.x-dev.tar.gz
  4. Note: the module sitedoc-5.x-1.x-dev.tar.gz is taken here as example please check the current version and or substitute with your preferred module.

 
 

Drupal is a registered trademark of Dries Buytaert.