Posted by SJourney on November 7, 2011 at 2:28pm
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.
- Activate SSH through your Hosting Control Panel and jump through all the hoops (SMS you a passcode etc..)
- mkdir ~/tools && cd ~/tools
- wget -O - | tar xzf -
- cd drush/
- ln -s drush ~/bin/drush
- type: drush (see if you get any output, most likely an error)
- edit ~/.bashrc ( add the line: PATH=/usr/local/php5/bin:$PATH )
- save ~/.bashrc and in the shell type: source ~/.bashrc
- type: which php (should return /usr/local/php5/bin/php) and type php --version (should be php 5.x)
- 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
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
You can include your .bashrc file from your .bash_login file via:
if [ -f "$HOME/.bashrc" ]; then
source $HOME/.bashrc
fi