Installing Drush onto your server
This article discusses how to install Drush on InMotion Hosting servers. You will need to have SSH access and root access on your account in order to install Drush. If you do not yet have root access, please see our article on obtaining root access for your account. The steps below assume you have the ability to connect to your server via SSH. If you do not have the ability to do so, you will need to enable SSH on your server and then add your IP to the firewall so it can connect.
How to install Drush
- Connect to your server via SSH.
- Once connected, confirm that PEAR is on the server. You can do this by typing the command "pear version" in your command line. You should have no issue with this as all our servers have PEAR on them by default. The command should produce results similar to the example below.
$ pear version
PEAR Version: 1.9.4
PHP Version: 5.4.20
Zend Engine Version: 2.4.0
- Once confirmed, simply type in the command "pear channel-discover pear.drush.org" on your console. This will initialize the channel and add it to your PEAR channel list.
$ pear channel-discover pear.drush.org
Adding Channel "pear.drush.org" succeeded
- After adding the channel, we now need to install Drush. This is done by typing "pear install drush/drush" in the command line. You should see the install succeed as the code below demonstrates.
$ pear install drush/drush
downloading drush-22.214.171.124.tgz ...
Starting to download drush-126.96.36.199.tgz (505,989 bytes)
................................done: 505,989 bytes
install ok: channel://pear.drush.org/drush-188.8.131.52
Installing a specific version of Drush
The steps above will install the most current stable version of Drush onto your server. You may, however, need a specific version of Drush installed. For example, if you are using php version 5.2, you cannot use Drush version 6. You will need to install version 5.9. To do this, simply enter the install command as shown below.
Should things go wrong, or you simply decide that you no longer wish to use Drush, you can uninstall it from your server with the "pear uninstall" command. Below is an example of how to uninstall drush.
uninstall ok: channel://pear.drush.org/drush-184.108.40.206
You now know how to install and even uninstall Drush from your server here at InMotion Hosting. Should you have any further questions, be sure to take a search through our Community Support Center. If you cannot find your topic there, be sure to ask the team a question and we will get back with you as soon as possible.
Support Center Login
Social Media Login
2014-10-16 11:01 am
How can one enable or install drush on a shared-hosting server?
According to the cited arcitle in your post, to set the root password seems possible on a shared-hosting server (to my surprise!), but the actual instruction didn't seem to be applicable: http://www.inmotionhosting.com/support/website/ssh/root-access-faq
I suppose there are many users (or almost all the Drupal users) who want to use Drush and I am one of them, so I am guessing it is available somewhere...? If not, may one just install it from the source code in their home area on a shared-server?
2014-10-16 12:52 pm
Thank you for your drush question. While we are considering adding drush on shared servers, at this time it is not available.
You will need a VPS, or Dedicated server to get root access, and install drush.
If you have any additional questions, feel free to post them below.
2014-10-16 3:47 pm
Thank you, John-Paul! That is clear to me now. As VPS is not an option for me, I am looking forward to Drush being installed in shared severs before long…
2014-10-24 6:38 am
Oh inmotion, how you tease with such great servers and software but no Drush on shared hosting??!! Very close to perfect habitat for Drupal developers who have wandered the wilderness of web hosting, please reconsider Drush on shared!
2014-10-24 8:11 am
We are definitely moving in that direction. We are currently making many improvements to our shared hosting and Drush is on the list! Unfortunately I do not yet have a time frame, but it is coming.
2015-03-20 9:31 pm
Let me add my voice to the InMotion Drupal chorus: Give Us drush on your shared servers, please!!