linux

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

Drush - too many levels of recursion

I'm a total linux noob. So when I tried to manually set up Drush on a Linux server today, I ran into a bit of trouble. Following the Drush instructions, I put drush outside of the webroot and attempted to create a symbolic link between the Drush directory and /usr/bin.

The drush readme instructs a noob to do the following:

ln -s /path/to/drush/drush /usr/bin/drush

So, I navigated to the drush directory and tried to follow instructions:

cd /var/www/drush
ln -s drush /usr/bin/drush

Attempting to run Drush then gave this error:
bash: /usr/bin/drush: Too many levels of symbolic links

After a lot of fruitless Google searching, I decided to try again with a closer attention to detail:

Subscribe to RSS - linux