To be able to install modules and themes in Drupal straight from the browser without any FTP access and without downloading and configuring stuff, read on. This guide will explain how to achieve this on your own server, so admin Drupal user can install a module automatically in seconds without worrying about where to download and how to unpack and upload stuff.

First of all, you need to be a root on the web server.

$ sudo chown -R www-data:www-data /var/www

This command will grant Apache2 privileges to access the /var/www folder and write to it, change /var/www to your Apache document root or only to the certain website, for example to /var/www/drupal7/

That is it!

Now you can install modules straight from browser graphical user interface. Log in as admin to Drupal and go to:

Modules > Install new module > Install from URL

and paste a link, that you copy from your desired module on Theme is also considered as a module and may be installed in the same way.

Copy a link address (works in Chrome) directly from the modules website (mouse right click overĀ tar.gz) and paste it into the Drupal modules section Modules > Install new module > Install from URL:

That’s it.