Drush - Installing on Hostmonster - shared server

cd ~
wget https://github.com/drush-ops/drush/archive/6.4.0.tar.gz -O drush.tar.gz
tar -xzf drush.tar.gz
rm drush.tar.gz
mv drush-6.4.0 drush
chmod u+x drush/drush
nano ~/.bash_profile
# If you need to specify a particular version of php for drush
# to use, Add the following line to .bash_profile:
export DRUSH_PHP=/ramdisk/php/54/bin/php54-cli
# Create the ~/bin folder if it doesn't already exist
cd ~
mkdir bin
# Add the following line to .bash_profile
# Then create a symbolic link to drush in ~/bin by issuing the following command:
ln -s ~/drush/drush ~/bin/drush
# to check your install, either login and logout or reload .bash_profile:
source ~/.bash_profile
# then:
drush --version
# Install composer in drush folder
cd ~/drush
curl -sS https://getcomposer.org/installer | /ramdisk/php/54/bin/php54-cli
# Create an alias to composer
nano ~/.bash_profile
# Add the following line to .bash_profile
alias composer="/ramdisk/php/54/bin/php54-cli ~/drush/composer.phar"
# In the drush root, run Composer to fetch dependencies
composer install

To access the server remotely, create an alias file. For example ~/.drush/example.aliases.drushrc.php that looks like this:

$home = '/home2/exampleuser';
$aliases['prod'] = array(
  'remote-host' => 'example.com',
  'remote-user' => 'exampleuser',
  'root' => $home . '/public_html/example/docroot',
  'uri' => 'example.com',
  'path-aliases' => array(
    '%drush-script' => $home . '/drush/drush.php',
  'php' => '/ramdisk/php/54/bin/php54-cli',

Internal References

Article Type