Get Drush working on Godaddy shared hosting plane

Drush is very important tool for drupal Developers, Its managed from Shell so a lot of people failed in getting it work at shared hosts like godaddy, I will explain briefly how to install Drush on godaddy shared hosting plane.

1- Open your Linux Terminal and create SSH Connection to you account

ssh username@website.com

and Enter your password.

2- Go to your main directory

cd ~/

3- Download the last version of drush to your Host space. (4.5 in this case)

-bash-3.2$ wget http://ftp.drupal.org/files/projects/drush-7.x-4.5.tar.gz

4- Extract the Drush compressed file .

-bash-3.2$ tar -zxvf drush-7.x-4.5.tar.gz

5- Make sure that your drush directory can be accessed by this command

-bash-3.2$ cd ~/drush

6- Make sure that you are at Home directory

-bash-3.2$ cd ~/

7- Create .bash_profile if not Exist and add the following lines inside it

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

if you want to use PHP 5.3 add the following lines instead

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

    How to Create .bash_profile file

  • vi .bash_profile
  • press i to convert your mode to be insert mode
  • past the previous code
  • press Esc to exit Insert mode.
  • press sheft+:
  • insert wq then press Enter

Now we have created .bash_profile file .

8- use the .bash_profile file .

-bash-3.2$ source .bash_profile

Thats all lets test our Drush by Implementing drush command

-bash-3.2$ drush

if there is any problem please write it in a comment.

Comments

garbagefortheages@gmail.com

I followed your instructions above but when I attempt to archive my site I get the following error:

-bash-3.2$ drush archive-dump
Command archive-dump needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this command. [error]
The drush command 'archive-dump' could not be executed. [error]
A Drupal installation directory could not be found [error]

Any ideas?

May bad. Just had to cd into html and all worked well. What a boob!

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.