Installing Composer and Drush on a shared hosting

Persons hand on piano keys, composer.

A number of shared web hosting providers give you access to the server via SSH. Quite often the SSH commands are limited for security reasons – it’s a shared hosting after all.

To install Composer:

curl -sS https://getcomposer.org/installer | php

(https://docs.drush.org/en/master/install/)

Place the file at the same location as composer.json and run php composer.phar install

To install Drush:

wget https://github.com/drush-ops/drush/releases/download/8.0.5/drush.phar

(https://github.com/drush-ops/drush-launcher)

Place the drush.phar in the root of the Drupal. Then, you can run commands using php drush.phar Even if you cannot SSH into MySQL, Drush will connect to the remote db using details from the settings.php file.

Drupal’s docs on how to

https://www.drupal.org/node/2366283

Leave a comment

Your email address will not be published. Required fields are marked *