Need help finding something? Start Here

How to install Drush in cPanel with CloudLinux and CageFS

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:

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

vim /etc/cagefs/conf.d/drush.cfg

And add this content:

comment=Allow drush to work on the server



Next, update CageFS

cagefsctl --force-update


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,

sign up to our cPanel service now

Was this helpful?: 
Average: 5 (1 vote)
Ivan Grynenko's picture