Install drush in Simple Hosting

In this article I will explain how to install drush in a Simple Hosting instance of

First we need to get SSH access and mv to the directory /srv/data/var/php/admin

The recommended method to install drush is using composer, but with Simple Hosting we cannot perform a global installation.

curl -sS | php
php composer.phar require drush/drush:7.*

Drush is now installed and can be used directly or in a script using the full path: /srv/data/var/php/admin/vendor/drush/drush/drush

Here is an example script that I use to upgrade my Drupal installations:

 DRUSH="bash /srv/data/var/php/admin/vendor/drush/drush/drush"
 cd $SITEPATH/htdocs/
 cp .htaccess ../
 $DRUSH pm-refresh && $DRUSH pm-update drupal --no-backup
 mv -f ../.htaccess ./
 cd ..
 chown -R $USERNAME.$GROUP $SITEPATH/htdocs/

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *