I have been experimenting with Cloudways and Digital Ocean as a hosting solution.

I am attempting to set up Drush and have been following some instructions provided by GoDaddy.

The notes appear up to date and well written - See https://uk.godaddy.com/help/how-to-install-drush-on-cpanel-shared-hosting-12396 . I am not using cPanel but I do not think this should matter.

When entering

echo "alias drush='~/drush/drush'" >> .bashrc

The system returns

echo "alias drush='~/drush/drush'" >> .bashrc
bash: .bashrc: Permission denied

The same also happens with sudo

After continuing with rest of the instructions Drush is now installed but does not seem to be available for the public_html directory. I'm guessing that the GoDaddy instructions are missing a step or are not quite compatible with this environment.

I have provided an example of a Features download (below) and as can be seen, the download is being placed in the drush directory and not sites/all/modules

[master_vkhgjqkyfv]:public_html$ drush dl features
Project features (7.x-2.8) downloaded to /home/master/.drush/features.

Can anybody say what I need to do to get this working properley?

5 Answers 5


I'd recommend trying the official Drush installation instructions. Note that the first recommended installation method is to download the phar, which you might find easier to get working than the Composer-based instructions.

The GoDaddy instructions (at the time of this writing) recommend installing the latest unstable version of Drush. This is not recommended unless you are planning on frequently updating Drush, in which case you are better off installing via git rather than downloading an archive.

  • Thank you for the suggestions greg, indeed I followed these updating my local copy of Drush. It seems I need to revisit this later as the permissions on Cloudways, appear to be really locked down, not even allowing modification of .bashrc Mar 28, 2016 at 11:00

It is preinstalled so installing is not required if you install Drupal through single click installer.

If you have launched php stack and installed Drupal manually then you won't be able to install Drush.

This article might help you: https://support.cloudways.com/setting-up-drush-remote-aliases-for-drupal-sites-on-cloudways/

  • It seems that Drush 6 is preinstalled as this ships with Debian Linux.. Mar 28, 2016 at 23:17

You need to define the full path of your .bashrc file

echo "alias drush='~/drush/drush'" >> ~/.bashrc
  • Actually Mohammad I had been doing this and this was the point of my question because the server was replying "bash: .bashrc: Permission denied". Thanks Mar 28, 2016 at 9:19
  • the .bashrc is in your home directory so you should always have access to it. to fix its permission do this: chmod 755 ~/.bashrc; chown username:group ~/.bashrc; Mar 28, 2016 at 9:23
  • Struggling with this. I think the permissions must be really locked down, as I can't use chown or chmod. Server says I am not on the sudoers list. Mar 28, 2016 at 10:05
  • try without sudo Mar 28, 2016 at 10:07
  • [paul]:home$ echo "alias drush='~/drush/drush'" >> ~/.bashrc bash: /home/master/.bashrc: Permission denied [paul]:home$ Mar 28, 2016 at 10:12

The support said that drush launcher is preinstalled by default but it wasn't on my newest instance. They promised me to check it out but nothing happened so far, so here is my workaround.

Cloudways doesn't allow to edit .bashrc but .bash_aliases is editable. I also needed some other customizations like downgrading composer. So I created a directory in $HOME and set up as $PATH.

cd ~
mkdir run
echo "export PATH=$PATH:/home/master/run" >> ~/.bashrc
cd run
wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
chmod +x drush.phar
mv drush.phar drush

My solution for getting remote drush commands to work on a Cloudways server (since they restrict editing ~/.bashrc) was to provide the path to the remote drush script as part of my local aliases file:

    'path-aliases' => 
            array (
            '%drush-script' => '/home/master/.composer/vendor/drush/drush/drush',

Everything worked normally after that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.