I previously had Drush working on my VPS, but for some reason since a server update Drush can no longer be located.

If I do 'which drush' the output is '/root/.composer/vendor/bin/drush' which matches what is in my .bash_profile:


My drush installation is actually at /opt/drush-8.x/vendor/drush/drush

This may seem like an obvious answer, but when I tried editing .bash_profile to what made sense to me, something got broken (couldn't use any commands) and my hosts had to restore my old .bash_profile for me. I may just have made a typo then, but wanted someone to confirm exactly what my .bash_profile should say before I try again!

1 Answer 1


This is really a Bash / shell question - how to modify the path or set an alias. Anyway, replace




assuming you may have other stuff in $HOME/.composer/vendor/bin that you stil want to use.

If you want to be 110% sure that you don't break something, try it in Bash before modifying .bash_profile - just copy and paste the line inside Bash.

  • Thank you - that's worked for the path, I'm now getting other errors - but's a separate question!
    – iain-g
    Commented Mar 9, 2017 at 8:40

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.