Drush and Godaddy

Events happening in the community are now at Drupal community events on www.drupal.org.
SJourney's picture

I know what your're thinking:
[cringe]Godaddy[cringe]
I'll be changing hosting away from them once my contract ends but anyway...this is a little ditty on how to get Drush to work on godaddy(very hacky solution ATM). I wrote this because godaddy has PHP4 in the $PATH. I needed to get drush to run with PHP5.

  1. Activate SSH through your Hosting Control Panel and jump through all the hoops (SMS you a passcode etc..)
  2. mkdir ~/tools && cd ~/tools
  3. wget -O - | tar xzf -
  4. cd drush/
  5. ln -s drush ~/bin/drush
  6. type: drush (see if you get any output, most likely an error)
  7. edit ~/.bashrc ( add the line: PATH=/usr/local/php5/bin:$PATH )
  8. save ~/.bashrc and in the shell type: source ~/.bashrc
  9. type: which php (should return /usr/local/php5/bin/php) and type php --version (should be php 5.x)
  10. type: drush (this should work, if not, log out and start new SSH session

This is not a final solution. I tried to setup the environmental variable DRUSH_PHP=/usr/local/php5/bin/php and Drush still broke. The Drush script needs to be debugged to figure out why DRUSH_PHP isn't working. Right now nothing is breaking so I'm leaving this way.

Comments

The Bash config file

write2David's picture

I need to use .bash_login instead of .bashrc, since .bashrc doesn't execute when I login to GoDaddy via SSH.

You can include your .bashrc

whayes's picture

You can include your .bashrc file from your .bash_login file via:

if [ -f "$HOME/.bashrc" ]; then
source $HOME/.bashrc
fi

drush

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week