Update Drupal Modules using FTP in localhost

When you’re going to update Drupal 7 modules using FTP, you need to have a FTP server running in your computer. In Ubuntu/Linux, we can have one named vsftpd (Very secured FTP Daemon) by running following command in the terminal:


Drupal: 7.0+

OS: Ubuntu/Linux

Step 1: Install VSFTPD

sudo apt-get install vsftpd

Step 2: Have an FTP account

Next, we need to add your Ubuntu user account to the FTP group. You can do it either by:

Open Users & Groups > Manage Groups. Double-click on FTP. Put tick-mark on your user-account, and click OK.

In the screenshot above, I’ve added my user account “giga” to the FTP group. So, I can use my username “giga” and my account’s password to run FTP.

3. Configure VSFTPD

Run in terminal:

gksudo gedit /etc/vsftpd.conf

Make sure you have following lines in the configuration file. Also check that they’re not preceeded by a “#”:


Save and close the editor. Now we restart vsftpd by the following command:

sudo /etc/init.d/vsftpd restart

Step 4: Own your Drupal site

Run following command to own all of your Drupal scripts.

chown -R your-username /path-to-drupal


Yes, we’re done. ūüôā Use your username (“giga” in this example) and system password to connect to FTP while upgrading modules.




Running many sites on single Drupal installation

Yup, you may call it “multisite installation”. That means, you may run more than one site with only a single Drupal core.


Drupal 7.0+

Linux Machine

Step 1: Create a new virtual host

To run multiple sites, we need to create Virtual Hosts in our machine. For example, If I type http://mydrupal I’ll be taken to my drupal site. For that, first we need to change ‘/etc/hosts’ file. Run following command in terminal and provide root password when promted:

gksudo gedit /etc/hosts

Next, add following line to the file and save the file:    mydrupal

Step 2: Restart networking interface

Type in terminal:

sudo /etc/init.d/networking restart

Step 3: Configure Apache2

For the easiest way, go the directory /etc/apache2/sites-enabled. Here, you will see a file named something like 000-default (or whatever), open it for editing. Place following code for opening it for editing:

gksudo gedit /etc/apache2/sites-enabled/000-default

Now, you need to create a <VirtualHost> directive:

    ServerAdmin [your@email.com]

    DocumentRoot /path-to-your-drupal/

    ServerName mydrupal

    <Directory />
        Options FollowSymLinks
        AllowOverride All
    <Directory /path-to-your-drupal/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

    RewriteEngine On
    RewriteOptions inherit


Note that <VirtualHost> should contain the IP address you provided in step 1, we chose “” since it will be pointing to your own machine. Also, note the line ServerName mydrupal – here “mydrupal” is the name we chose in step 1.

Step 4: Restart Apache2

Type in terminal:

sudo /etc/init.d/apache2 restart

Yup, that’s all!


Type http://mydrupal in your browser, you will see the new drupal site running! Now you can create all the necessary files (database settings, modules, themes etc.) under sites folder of your Drupal path. Copy the path-to-drupal/sites/default folder and rename it to path-to-drupal/sites/mydrupal.

Next, you can (should):

  • Edit “path-to-drupal/sites/mydrupal/settings.php” – for database settings. Change database username, password, database name etc.
  • Create a new database if necessary, using PHPMyAdmin, or whatever.