Drupal Install Modules and Themes using SSH


If you don’t want to install Drush and don’t want to use FTP (I like a secure server)

Install Drupal modules via SSH on Ubuntu Server (12.04 LTS)

Assumptions: You have/are…

  • Unix command line proficient
  • Rsync capable
  • Apache2/Ubuntu directories (other flavors of Linux may vary)
  • Download module or theme to desktop
  • Unzip file to an empty directory

  • Upload module or theme to remote server via Rsync > (Rsync is more secure than FTP and Rsync uses SSH)
  • sudo rsync -azv /home/user/drupalmodule/ -e ssh user@slice.remoteserver.com:/home/user
  • Copy module to apache site directory www.example.com
  • sudo cp -Rf google_analytics /var/www/www.example.com/sites/all/modules
  • Access your site via browser and Goto Modules
  • Enable module and setup as required
  • 99% of the time if you followed all these steps and you don’t see the module in the modules section, its a permission problem. Set or Change Permission for Drupal modules

    find /var/www/www.example.com/sites/all/modules -type d -exec chmod 755 {}

    find /var/www/www.example.com/sites/all/modules -type f -exec chmod 644 {}