1

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?

1

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.

|improve this answer|||||
  • 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 – MrPaulDriver Mar 28 '16 at 11:00
1

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/

|improve this answer|||||
  • It seems that Drush 6 is preinstalled as this ships with Debian Linux.. – MrPaulDriver Mar 28 '16 at 23:17
0

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

echo "alias drush='~/drush/drush'" >> ~/.bashrc
|improve this answer|||||
  • 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 – MrPaulDriver Mar 28 '16 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; – Mohammad AlQanneh Mar 28 '16 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. – MrPaulDriver Mar 28 '16 at 10:05
  • try without sudo – Mohammad AlQanneh Mar 28 '16 at 10:07
  • [paul]:home$ echo "alias drush='~/drush/drush'" >> ~/.bashrc bash: /home/master/.bashrc: Permission denied [paul]:home$ – MrPaulDriver Mar 28 '16 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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