RedyHost customers who run Drupal websites in a cPanel hosting, ask us about getting Drush available in cPanel. Of course RedyHost cPanel hosting comes with Drush preinstalled and available inside the GageFS.
This page describes how to install Drush in a cPanel/WHM server with CloudLinux.
This page should be used by system admins who want to make Drush available to their customers in cPanel with CloudLinux/CageFS installed.
First, SSH to the cPanel/WHM server as the root user.
Next, run these commands to install drush:
cd wget https://s3.amazonaws.com/files.drush.org/drush.phar chmod +x drush.phar mv drush.phar /usr/local/bin/drush
Now, as you have installed drush, let's add it to the CageFS so that users could access it
And add this content:
[drush] comment=Allow drush to work on the server paths=/usr/local/bin/drush
Next, update CageFS
Test to see if it works, become a CageFS user.
su cagefsuser vi ~/.drush/drush.ini [Add `disable_functions=` and save the file] drush init
To benefit from (benchmarked) fast cPanel hosting, including free as-is cPanel account migration,