How to install drush on Godaddy cPanel hosting

×

Error message

Deprecated function: Creation of dynamic property BotchaFormNone::$id is deprecated in BotchaFormNone->__construct() (line 214 of /home/kzn/domains/duntuk.com/public_html/sites/all/modules/contrib/botcha/controller/form/botcha.form.controller.inc).

If you're using godaddy cpanel hosting, you have 2 options of installing drush

1. drush version from drupal (which is NOT being updated anymore--unlike the latest github version).

or 2. (Preferred) Install the latest github version:

Go here to view instructions on how to install the latest version of drush from github.

cd ~
wget http://ftp.drupal.org/files/projects/drush-7.x-5.9.tar.gz
tar xvf drush-7.x-5.9.tar.gz 

Now we add the drush paths to our .bash_profile.

vi .bash_profile 

Paste the following in toward the top:

# drush start #

export DRUSH_PHP="/usr/bin/php5"
export COLUMNS
alias drush="/usr/bin/php5 ~/drush/drush.php"
alias php="/usr/bin/php5"

# drush end # 

Save the file (type ":x")

Your bash_profile should look like this:

# .bash_profile


# drush start #

export DRUSH_PHP="/usr/bin/php5"
export COLUMNS
alias drush="/usr/bin/php5 ~/drush/drush.php"
alias php="/usr/bin/php5"

# drush end # 

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

Make sure to apply the changes to bash:

source .bash_profile

Now test--you should get a long list of commands.

drush
Tags: cpanel godaddy drush Linux