Install Drush 7+ For Drupal 8 on CentOS 6 Multi-Account, CPanel

Interested in Drupal 8 and need Drush on your VPS or Server?

If you’re interested in investigating Drupal 8 and wish to use Drush, you’ll find that Drush 7.x+ is a requirement of Drupal 8. If you have an earlier version or are installing Drush for the first time on a CentOS 6/CPanel environment, these simple instructions will get Drush up and running.

Composer is a requirement. Check to see if it’s installed.

SSH into your site’s hosting account.

user@host $composer –version

Install the latest version of Drush:

user@host $ cd ~/

user@host $ composer global require drush/drush:dev-master

Once Composer finishes you’ll need to setup bash to recognize the install by adding an alias to your ~/.bash_profile or ~./bashrc file. You can use vim, nano, or an editor of your choice. The examples below assume .bash_profile. Substitute .bashrc if setting the alias in that file.

user@host $ nano ~/.bash_profile

Add this to your .bash_profile:

alias drush=”~/.composer/vendor/bin/drush”

You may receive a “command not found” error if testing Drush. In that case, register the alias with bash:

user@host $ source ~/.bash_profile

Check to see if Drush is working.

user@host $ drush status

Look for “Drush version” in the results and you’re good to go.

Leave a Reply

Your email address will not be published. Required fields are marked *