Installing modules and themes is really important in Drupal and you can make life alot easier for yourself when updating if you follow a few simple points which I’ll outline in this short tutorials.
Organising your module and theme folders
Dumping all your modules in the main modules folder in your Drupal site root is often assumed as the correct place to put them. There’s nothing wrong with it and your modules will still work fine but it can make updating modules tricky. Following a simple folder structure can keep your site organised and help alot when the time comes to update. It’s the same principle for themes too.
Your modules and themes should be placed in your sites/all folder in two folders called modules and themes as follows:
This work great for single site installations but if you want a Drupal multisite setup then move onto the next point, if not you can skip it out unless you’re curious.
A Drupal mulitsite setup is slightly different in that you want to group modules and themes common to all sites in your sites/all folder and put modules and themes specific to individual sites in folders like sites/siteinstall1, sites/siteinstall2 and so on.
I’ll expand on this with a few examples:
Modules and Themes common to all sites
Modules and Themes specific to individual sites
And you continue this for all the sites in your Drupal multisite setup.
There’s loads of information on Drupal mulitsite setups on Drupal.org.
Getting the correct module or theme version
Visit the Drupal.org module repository or theme repository and select the modules or theme you want to use.
As I mentioned in another tutorial Drupal really helps you out in selecting which module or theme version you should use by recommending which module/theme version works with which Drupal version. You should always follow this unless you are told another wise on the module or theme project page.
Downloading and untaring
Once you’ve selected the correct module or theme version for your Drupal setup you need to download it to your computer and then unrar it using something like winRAR (demo verion is free for 30 days) or 7-zip.
Make sure you unrar to the lowest possible folder in the module or theme bundle you downloaded.
about_this_node-5.x-1.4.tar -> about_this_node-5.x-1.4 -> about_this_node
Then you’d put the about_this_node folder into your site/all/modules folder or sites/site1/modules depending on your Drupal setup.
Before you start uploading the modules/theme it’s recommended to look in each module or themes’ root folder for a README or INSTALL text file as some modules/themes require you to follow specific procedures inorder to install them correctly.
Ok, you’ve downloaded your modules\theme now it’s time to upload it again! For this you’ll need an FTP client.
There are many free FTP clients out there and a simple Google search for FTP clients will bring you a whole range of FTP clients. I use and recommend Fire FTP for Mozilla Firefox.
FireFTP is an add-on for the Mozilla Firefox browser and it allows you to simply drag and drop files from your computer to your server/hosting.
More information on using FireFTP.
NOTE: You can setup a local server on your local computer and have you computer run like a server.
I’d highly recommend using WAMP server for Windows and XAMP for Mac to setup a server on your computer.
See this article on installing Drupal locally for more information.
Enable your Drupal module or theme
Once your modules or theme are uploaded to your server you need to go to the modules admin page (yoursite.com/admin/build/modules) or your themes admin page (yoursite.com/admin/build/themes) and enable the module or theme by checking the “enable” checkbox (modules) or checking the “enable” and “default” checkbox/radiobutton (themes) next to the module or theme you want to enable.
NOTE: You can enable more than one theme at a time and allow user via access control (yoursite.com/admin/user/access) to switch between themes as they please.
If you want to use just one theme throughout your site make sure you only able one theme.
Enabling a module
Enabling a theme
Enabling a theme
When installing modules Drupal may prompt you to install or enable other modules to support the module you are enabling. Follow the instructions Drupal gives and you’ll fine.
The Throttle option?
You may have noticed the throttle checkbox on the modules admin page. Drupal allows you to turn off or throttle modules at times of high traffic to aid performance. I’d ignore the throttle for now as turning off modules can have implications throughout your site.
Configure your Drupal module or theme
Alot of modules offer extra configuration options that you can tweak. To find out go to Site Configurations link (yoursite.com/admin/settings) and look for the name of the module or modules you just installed.
Themes can also offer you extra configuration options (for example to show or hide node meta data on node view or show or hide user pictures in comments).
Go back to your theme admin page (yoursite.com/admin/build/themes) and next to your theme you’ll see a “configure” link, click and you’ll find all the configuration options.
Testing and report bugs
Now it’s time to test out the modules and theme(s), so go ahead and enjoy!!
If you spot a problem or potential bug while using a module or theme then you need to submit an “issue report” to the module or theme maintainer.
To do this go to the module or themes project page on Drupal.org and first check if the bug has already been submitted by clicking on the “View all issues” link and have a look through the issues for something similar to your issue.
If you don’t find anything similar click the “View open issues or create one” and then in the top left (you must be logged in) click the “Create a new issue” and submit your issue.
Make sure you select the right version of the module or theme (the version you are using) and give as much detail as possible about the issue you are having.
Remember most people have submitted their modules for free and do it in their spare time so don’t expect it to be fixed in a flash and be polite, it always helps!!
Hopefully this has got you up to speed on how to install Drupal modules and themes, as always comments and questions are welcome!!