How To Update Drupal Modules via SSH (Putty)

| Drupal Development | 7 seen

To strengthen Drupal websites security I decided to disable one-click automatic module updates from Drupal dashboard, unfortunately, it makes it harder not even for bad guys to compromise Drupal website but it also makes it harder for Drupal devs.

Now, there are several options you might choose instead, composer being a top of them. But for this article, I will write down how to update modules using SSH.

For Windows, we are going to use Putty:

From your Drupal installation go to the modules folder

cd /sites/all/modules

now, using wget download desired modules and extract:

sudo wget https://ftp.drupal.org/files/projects/file_entity-7.x-2.21.tar.gz
sudo tar -xvzf file_entity-7.x-2.21.tar.gz

Go back to the Drupal website and run updates. Next, you would like to delete tar.gz file from the modules folder

sudo rm file_entity-7.x-2.21.tar.gz

Add new comment