Setting up Drush on Siteground's shared hosting environment

Just a quick note to other siteground users with ssh access to their shared hosting accounts: Drush can work via the command line in a siteground environment. Here are some specific settings that I had to include to get it to work:

~/.bashrc: alias drush='/usr/local/php52/bin/php-cli ~/drush/drush.php --php=/usr/local/php52/bin/php-cli'

~/.bash_profile PATH=$PATH:~/home/[myuser]/drush:$HOME/bin

You might want to check your particular shared hosting environment to ensure that the selected PHP version is not using fast-cgi, that seemed to cause problems for me with drush. Luckily, Siteground makes multiple versions of php available to its users. If you're having trouble, you can just take a look at the /usr/local directory and pick a different version of PHP

After you've made your changes, be sure to source .bashrc so that your system reloads the new settings.

This works when I am logged in to the server but I can't seem to get it to work when using Drush Aliases to remotely run drush.
#drush @sitegroundsite status

Any thoughts?

Thanks for the tips; they did work, up to a point, and that makes me very happy. My problem is that I'm spoiled: I don't feel like I'm really using Drush unless I'm in its fabulous cli mode. Alas, my Siteground shared hosting environment lacks some pretty basic components, like tty and ncurses, without which the cli mode crashes in flames. I guess I'll have to get used to typing "drush" a lot.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.