Last updated March 7, 2013. Created by skessler on August 27, 2010.
Edited by 2020media, dayofthedave, David_Rothstein, dorion. Log in to edit this page.
You can add third-party contributed modules to extend or alter Drupal's behavior.
Note that advanced Drupal site builders often use command-line techniques like the UNIX wget command or drush.
Choose the module file
Choose the right release. When you have chosen a module to add to your site, you must choose which release to use. The version must be compatible with your version of Drupal. Note that 'Development releases' are versions of the module that are in an active stage of development. They may be written for a previous/current/future version of Drupal, are considered unstable, and should be handled with care. 'Recommended releases' are stable and ready to use.
Upload the module
There are two basic ways to upload module files to a Drupal 7 site:
- Through the Drupal user interface
- Manually on the server
The first option will not work on many types of servers, but may be a more user-friendly choice on servers where it does work. The second option is always available.
Option 1: Upload the module through the Drupal interface

- Navigate to the install page. Navigate to Modules > List (tab), or
http://example.com/admin/modules, and click the link 'Install new module.' (You must have the Update manager module enabled to see this link.) - Follow the prompts. You will be prompted to provide either the URL to the download, or to upload the .tar.gz or .zip file from your local computer. Click 'Install', and the Update manager will copy the files into your
sites/all/modulesfolder. (See Update manager for more information about what that core module can do.) The next screen gives you two links. Click 'Enable newly added modules' and skip down to the 'Enable and configure' section.
If your site asks for your FTP username and password, it is referring to the username and password to access your site, not drupal.org
A note about FTP: If FTP is not enabled for your server, you may receive an error message. Drupal will not be able to diagnose the problem, only tell you that there is one. It's up to you to determine whether your server is properly configured for FTP.
Option 2: Upload the module manually
- Extract the files.The downloaded module package will be in a compressed file format such as 'tar.gz'. On Windows, use a program like 7-zip to extract the files. On modern Mac systems, double-click the .tar.gz file. For *nix systems, use the command line:
tar -zxvf modulename-drupalversionnumber.tar.gz
You should see a list of files extracted into a folder. - Upload the folder.
Transfer your files with SFTP or FTP to the desired modules folder in your Drupal installation (or if you are using version control, add and commit them to your code repository). The modules folder at the top level of your Drupal installation is reserved for Drupal core modules (the ones that come with the original download of Drupal). Contributed modules belong in sites/all/modules. If you are running a multi-site installation of Drupal, usesites/my.site.folder/modulesfor modules there that are specific to a particular site in your installation. Modules that will be shared between all sites should be placed insites/all/modules.
Please note: Especially for sites with a lot of additional modules, many people have begun to further divide the modules folder, to help stay organized. A typical way of doing this would be:
sites/all/modules/contribfor all contributed modules.sites/all/modules/customfor all custom modules.sites/all/modules/featuresif you have additional modules that were created using Features.
Enable and configure
- Read the directions. If the module has an installation file (usually INSTALL.txt and/or README.txt), read it for specific instructions. There are modules that require special treatment, and even modules that depend on other downloaded files to function properly. Sometimes the README file has no .txt extension. If you double-click it, your computer won't know what program to use. In that case, open a text editor first, and then open the file using the editor's 'file open' command.
- Enable the module. Navigate to Administer > Modules or
http://example.com/admin/modules. Check the 'Enabled' box next to the module and then click the 'Save Configuration' button at the bottom. Note: If you are updating an existing module, you'll need to click 'update script' at the top of the page or loadhttp://www.example.com/update.php, then click 'Continue' (after making a backup of both your database and 'sites' folder). - Set up permissions. Some modules will require that you change permissions to get them working. Permissions information may be in the instructions that came with the module. Navigate to Administer > Modules and click on the 'Permissions' button for the desired module.
You can also do this on the Permissions page (Administer > People > Permissions). Scroll down to see if the module appears in the list and, if it does, give the appropriate permissions to desired roles. - Adjust settings. Most modules will have some type of settings page. It will vary from module to module but if not described in the README.txt file, it can usually be located by navigating to (Administer > Modules) and clicking on the 'Configure' link for that module. Not all modules have settings pages.
Please note: You can only have one copy of a module with the same name in each Drupal site. The module's name is determined by the name of the .module file, not by the name of the directory.
Tip: If you run into problems, search the module's issue queue and the forums. If your problem hasn't already been addressed, post a question or issue and someone will try to help you out.
Tip: To keep up-to-date on any issues and fixes related to your newly installed module(s), you can create a user account on Drupal.org (if you haven't done so all ready) and then subscribe to the feed of each module you are using.
| Attachment | Size |
|---|---|
| versions.png | 173.63 KB |
Comments
Sorry, this page is not helpful for me, a newbie
No matter which way I go I cannot install a module as a newbie (Drupal 7.0 on Natty) ...
I get the FTP issue when I try to use a URL. This page says "If FTP is not enabled for your server, and you try to install via URL, you may receive an error message", but it's not "my" server, it's yours (ftp.drupal.org)! Surely the wording could be improved here. What exactly needs to be enabled? FTP client access? I'm a Windoz user mainly and don't know Linux that well, but I was a developer so know a bit about these things, and frankly this wording is very confusing.
Trying to use the "Install manually" option, I get the FTP thing again! AAARRRRGGGG! What??? Why is it even talking about FTP when I am selecting a local file. I simply don't understand.
Sorry, but Drupal is really hard to get into, even for a bit of a geek.
I think there is awesome potential here (while not digging the PHP thing), and thanks for all the voluntary effort.
Regards,
Pete Miller (The Captn)
Pete, It is confusing
Pete,
It is confusing because there are two FTP connections here - one to ftp.drupal.org to GET the file, and one to your host to PUT the file.
It is the latter that needs to be enabled.
K
It was very confusing
I was confused, and I am only semi-new to Drupal. It looked like it was asking for a password to the remote server to download the module. In reality, the remote connection uses http, not ftp, and doesn't require a password. It's asking for credentials to use FTP to write the module to the local machine, probably because the web server doesn't have write privileges to the modules directory (for security reasons), so it needs to use FTP. It's counter-intuitive to think that Drupal needs to FTP in to the local machine. It looks like the directions have been improved on that page in more recent versions of Drupal 7.x, but it could probably stand even a bit more explanation, owing to the counter-intuitive nature of the situation.
Another newbie understands your pain
I was really having a hard time understanding Drupal until I came across a couple of books (after looking at about 6 others) that got me going. The first was "Foundation Drupal 7" by R. J. Townsend that is really like a "missing" manual for all the Drupal menus and helped me get a handle on the pieces that make up a site, and "Drupal 7 Module Development" by Matt Butcher, et al., which focuses on custom Module development and helped me understand the pieces of a module by showing me how to create my own. I'm not fully there yet, but I think I'm getting how Drupal is put together and how I can make it work for what I need. I was lucky that where I live (Boise, Idaho) my city library has several books on Drupal and especially lucky that I have access to the Boise State University (go Broncos!) library where I got access to the two books I cited above.
On the specific problem you are having installing a module, I wonder if it might be easier (at least for the first module) to install Filezilla on your Windows box for doing the FTP stuff to your site and manually copy the module files over to where they go on your Drupal site? That's kind of what I did (first doing things manually w/Filezilla).
In case it's of any help, I've recently started using a low cost ($5/month, one month minimum) hosting service from DailyRazor (they call it their "Standard Linux Developer PHP/Ruby on Rails" plan). I was previously using WinHost because I was doing .NET stuff but although they supported PHP, they had some trouble with Drupal plugging-and-playing. I found it was very useful to have a remote hosting service (that Drupal runs on) to run my stuff on and the $5 commitment made it pretty easy. I think there are other cheap hosting services (HostGator has been recommended to me) that might be better in long term, so far DailyRazor has worked OK so I'm continuing to use it until I need to change.
Can't find the install button on the Modules page
Just installed Drupal 7 on my localhost and trying to install some modules. The problem is I don't see the "+install new module" word link on my Modules page. And I tried installing manually by placing the folder as instructed, but I still can't find them on the Modules' page to turn them on.
Any help would be appreciated. TIA.
One more thing
I just did some test and found that the above problem occurred when the site was exported from Drupal Gardens then imported to my local host with Acquia dev desktop. When I created a new site from DAMP, the "Modules install" link was there as expected. Anyone know why that is?
I'm glad it wasn't just me
http://www.drupalgardens.com/content/after-exporting-site-where-install-...
Here's the answer.
Lesson learned: when installing modules from sites exported from Drupal Gardens, you have to do it the old-fashion way.
No Way To Get Around This?
So a site that was exported from Drupal Gardens is fatally flawed to never be able to have the "Install New Module" link on it? Seems there has to be a solution. Anybody?
The "Install new module" link
The "Install new module" link only appears if you have the Update Manager module enabled.
That information should really be added to the documentation above.
Missing information in docs
I'm a new user and I had to read the above comment to understand why the link is missing. Please put this information in the docs above.
Thank you.
Another Drupal mystery solved
That answers my question. Thanks.
Thanks a lot dazweeja
Thanks a lot dazweeja
Going crazy
I got that famous FTP error... always. but I DO have FTP server running and I am sure I am entering the user and password correctly, so I don't realize what's the problem.
Well, I'll try to do it manually, but it is a pain :(
I think I have a solution for this FTP credentials question
I have been fighting this problem several times, without success.
Now I have been able to pin down the problem.
The wanted behaviour is:
What I have seen on several installations, and this is what you don't want:
To avoid this, make sure the folder
/sites/defaultis OWNED by the user that executes the drupal scripts. On most Ubuntu installations, this is the user apache user: www-data.Don't ask me why this works. I don't know if this is intended or not. It doesn't make so much sense to me, but there might be an explanation. For me it would be OK that the temporary directory is writable by the apache user and the themes or modules folder is writable as well.
So this should do the trick when the user is www-data:
chown www-data sites/defaultI hope this works. Please let me know.
This needs to be changed!!!
The actual problem is that for some beyond retarded reason in modules/update/update.manager.inc on line 706 (in my present setup, drupal 7.2) the following check is performed:
if (fileowner($project_real_location) == fileowner(conf_path()))with the comments explaining that conf_path() resolves to e.g. sites/default (why the "e.g." is beyond me - could it be something else?!? or is "i.e." what the authors meant to say?).
The $project_real_location (how real could it be, it is a temporary location underneath temporary:/") is where the file is downloaded and extracted.
Depending on the server setup, this can be randomly complicated by a number of factors. Fact is, even if the web server user has all the rights to write all over the place, it wouldn't make any difference. Enjoy wasting your time trying to make it do so.
And why select a location that is generally created manually prior to installation to check its ownership against files actually created by the web server user. There must be a better way to deal with this.
Eventhough, Wordpress is using a similar mechanism (someone is bound to have borrowed it in/from Drupal), they do have a configuration option that overrides this. This is in particular a problem when users can manipulate their setup, but cannot change ownership of files, and especially critical when performing backup, migration, or other maintenance tasks.
Even if there is no easy workaround for this, there has to be at least a hint clarifying exactly what the problem is and how to go about this in case it occurs.
Also note that the web server user may vary. On our setup it was assigned to games (id=5) for whatever reason, so intuitively changing the ownership to www-data (id=33) did not make any difference.
If there is absolutely no way around this, then include an empty file that serves this sole purpose - controlling the write access, but for goodness sake, do not rely on some odd side effects.
I could only join the above user(s) in their frustration! Way to waste people's time!
EDIT:
P.S.: Please do excuse my tone, but I can imagine that the time spent on writing this particular piece of code is by no means comparable to the number of users affected by this and the amount of time they wasted trying to figure this out. The impact of this is quite large (just do a random search for issues related to this). Although it is not directly a security issue, it may have led many people to go against common security practices in desperate attempts to fix this (as some "solutions" appear to suggest).
Also, the amount of misinformation being spread regarding this issue, without understanding the actual problem, is quite astounding. There should be absolutely no need to fall back to FTP in this case or to manipulate permissions randomly in hope of fixing the problem (chances are it will not work anyway).
worked for me
So this should do the trick when the user is www-data:
chown www-data sites/default
I hope this works. Please let me know.
yes it did work
works for me too
So this should do the trick when the user is www-data:
chown www-data sites/default
works fine,
Thanks
Multi-site configuration
So this should do the trick when the user is www-data:
chown www-data sites/defaultBut with multi-site configuration it must be done over the multisite directory:
chown www-data sites/_multisite_directory_Rafa Couto (caligari)
GNU/Linux user #99126 - http://bit.ly/LC-99126
GPG key - http://bit.ly/GPG-D76ABDEC
Can you tell me please where
Can you tell me please where this code needs to go? Thanks.
if you haven't figured it
if you haven't figured it out, I was able to figure this out here.
https://help.ubuntu.com/community/Drupal
In terminal, I had to add the -R flag to get the owner to change for all of the module directories.
in my case, it was where all of your contributed modules should go in the
sites/all directory.
sudo chown -R www-data:www-data sites/all
what will be the code for localhost
What if you are having same problem with local host? where can you enter the code on mac machine and what would be the code?
There is only one Creator and everything you see is created!
YES IT DOES WORK
Many many many thanks for solving this issue, I've been searching for good while !
chown www-data sites/defaultSolving problems means being smart. Avoiding problems means being wise.
UR welcome
Oh yes. It was a little headache to find the trick. I hope the solution is great saving time for others :)
Rafa Couto (caligari)
GNU/Linux user #99126 - http://bit.ly/LC-99126
GPG key - http://bit.ly/GPG-D76ABDEC
It works
Thank you it works
cannot pass '#overlay=admin/update/ready'
I've just performed an update for 3 modules & cannot now pass the '#overlay=admin/update/ready' page. Is there a specific URL I can enter to get to the next stage of the update?
Thanks.
Please update this and all related help documentation!
Drupal team, I don't understand how this page hasn't been updated yet! I just installed Drupal (version 7.8) for the first time and it was extremely frustrating that I couldn't figure out how to get a module installed. I'm not sure if ANY of the previous comments have been read by the person who wrote this document or if this one will be read, but the current documentation is very incomplete. The message about FTP needing to be enabled is absurb, but people have already discussed this. Changing my sites/default ownership to www-data wasn't sufficient. I had to follow the instructions on this link to get modules to install on my Debian 6 linux installation:
http://drupal.org/node/244924
More specifically:
[root@localhost]cd /path_to_drupal_installation
[root@localhost]chown -R greg:www-data .
[root@localhost]find . -type d -exec chmod u=rwx,g=rx,o= {} \;
[root@localhost]find . -type f -exec chmod u=rw,g=r,o= {} \;
FTP.
I have disabled FTP on my server. I have full control of my server, with Drupal, Mediawiki etc installed, and I regard the use of FTP by anybody to be a security issue. I do allow SFTP, but only on request, and for limited periods.
Do Drupal developers believe that FTP is in common usage?
Syntax
I haven't used Linux in over 3 years and only used it for about 2 years before that so I'm a bit confused by the syntax. I need to run "sudo chown -R www-data sites/all". It took a while but I figured out that "site/all"="the websites' directory". I understand the beginning of the command, from previous experience, but what is "www-data". After reading a comment below, it seems like this may reference the domain of the site and I should actually create a user account named with the domain name on my box. Basically, is "www-data" literal or figurative? If it is figurative, what exactly is it?
~clonerep
I suggest trying 'man chown'
I suggest trying 'man chown' if you have access to a Linux box or reading the man page online somewhere.
www-data is the user account that would own the 'sites/all' directory (and everything below it with the -R flag used)
This worked for me: sudo
This worked for me:
sudo chown -R www-data sites/all/
Very Useful
Everything works perfect!
Thanks,
Jonex
Works guys,thank you so much
Works guys,thank you so much
Please do NOT follow the advice in many of the comments above
In particular, you should not be doing something like
chown www-data sites/default(as several of the above comments recommend) just to make the experience of installing modules easier on your site.Doing this will make your website less secure. In particular, it will open up the attack surface considerably in the case of a vulnerability elsewhere on your server. See http://drupal.org/node/244924 for more information.
Drupal (and the Update Manager module installation process) will work in this scenario, but that's mainly because it has to. Some servers (e.g. shared hosting) are set up this way and don't give website owners a choice, so Drupal will work with it if it has to, but it's still not recommended. We're also discussing this further at #932110: On some servers, the Update Manager allows administrators to directly execute arbitrary code even without the PHP module and might consider putting some deliberate roadblocks in place to make it a little less easy to install modules via this route.
Installing modules through the user interface is not required, and it's not intended for every site. For the most part, if you don't want to have a poorly-secured server setup and/or you don't already use FTP to manage your codebase, it's not for you. The
"Install manually"(since renamed to "Option 2: Upload the module manually") option described in the documentation above still works, just like it always has in Drupal.I think the documentation isn't too clear on this point (that they are both legitimate alternatives) so perhaps we should edit it to make it a bit more clear.
I just made a number of edits
I just made a number of edits to the page that will hopefully make this more clear. It could probably still use a bit more editing, though.
How can I fetch Data from Database in Drupal 7.10?
Yeah I know its a stupid question here to ask but I really need the solution, I am beginner in Drupal 7.
How can I fetch Data from Database in Drupal 7.10?
I am using Drupal 7.10
I have to make forms for retrieval of Student Result.
How can I extract data from database. Like If I enter a roll no of a student then detail of that student comes from database.
If I have to do coding then where and in which module.
Is Web form is use for retrieving data from database??
Thanks & Regards
Yes i can
worked but with issues
'chown www-data sites/default' got me past the first hurdle but I also had to add 'chown www-data sites/all/modules' because I received an error about being unable to create insert directory....
you can always do it from
you can always do it from command line
cd /var/www/sites/default/modules/
wget http://(module link)
then it'll show up in available modules
chown'ing your system to www-data means your webserver can write to that area now, so any haxor, bot, spammer and whatever can compromise your system now.
block
tell me can we install plugin into block that is i was created many blocks on theme and divide theme into blocks as i can add pluign into that block...
on windows , install module by ftp
example views
http://ftp.drupal.org/files/projects/views-7.x-3.3.zip
Question: With regard to
Question: With regard to pasting the module URL (from Drupal.org), how does the module upload process work? Does the file first get downloaded by your browser, then uploaded, via FTP, to the website? Or does your web server grab the file from Drupal.org directly, using FTP ?
Question: Why isn't HTTP used instead of FTP when uploading a module file from the interface. Can't a module file just be uploaded to sites/default/files/ and then do stuff with it?
http://drupal.org/node/1608658
check it.
Nidhi
Module Upload Drupal interface availability
Hi -
The following comment "The first option will not work on many types of servers, but may be a more user-friendly choice on servers where it does work. " was made in the upload mdule instructions. Can someone please explain why the Drupal module upload interface doesn't work for certain hosting providers? I'm using Bluehost (which is supposed to be recommended by Drupal.org) and the "Install New Module" feature isn't available. I'm trying to figure out if it's a function of the hosting provider, my Drupal configuration (7.14), or if it's just me and my lack of understanding on some of the finer points of Drupal...
If anyone can help, let me know.
Thanks!
Peter Roome
peter.roome@gmail.com
the newbies in pain
I was there as well several years back..The answer, and you know I'm right-and you are going to moan and sigh is
-drop gui and learn some distro of linux command line
your pain goes away;0
Page not found
I get the following error
The requested page "/?q=media/browser&render=media-popup&types%5B%5D=audio&types%5B%5D=image&types%5B%5D=video&activePlugins=&id=media_wysiwyg&plugins=undefined" could not be found.
looks like the popup with the file selector cant be found
all i get in configuration is
Media
File system
Tell Drupal where to store uploaded files and how they are accessed.
Image styles
Configure styles that can be used for resizing or adjusting images on display.
Image toolkit
Choose which image toolkit to use if you have installed optional toolkits.
im missing
File types
Media browser settings
Rebuild type information for media
does anyone got some good suggestions ?
There is no /admin/modules or 'Install new module'
Took me about half an hour to realise that I needed to go to /admin/config/modules not just /admin/modules. Didn't see the 'Modules' tab on the 'Configuration and Modules' page. It looks greyed out. I thought any options within the Config menu would show up as a sub-menu, but no. I suppose this is the sort of thing you get used to when you've been using Drupal for a while, but it was entirely counter-intuitive to me and I don't know why it doesn't match what was described here and in all the INSTALL.txt files of modules I've looked at.
I also don't know why 'Install new module' doesn't appear. The 'Update manager' module mentioned above seems to be enabled.
What version of Drupal 7?
I think the behavior you describe was the case way back in the day (when Drupal 7 was under development, well before Drupal 7.0 was officially released).
But in the actual Drupal 7 release, the page is definitely called "Modules" and it's accessible at admin/modules. So the documentation here is correct.