Date Published: November 1, 2024
Switching the default version of drush on Cloud Classic
Note
This article only covers Acquia’s non-Kubernetes version of Acquia Cloud infrastructure, referred to as Cloud Classic.
Switching the version of drush
picked up by default on Acquia Cloud Classic is possible. Note that we provide several versions of drush on the platform, the best practice however is to require the drush version you wish in your project via composer as a dependency. If drush is required in your project the executable will be preferred over the Acquia Cloud default. For example:
site@instance-xxxx:~$ drush10 --version
Drush Commandline Tool 10.3.4
site@instance-xxx:~$ drush10 @site.env --version
Drush Commandline Tool 10.6.0
In order to set the bash command drush
to call drush10
(just an example) all you need to do is add the following line to .profile
/.bashrc
(You will need to create one of these files if they do not already exist):
alias drush='/usr/local/drush10/vendor/drush/drush/drush'
... and then :
Now you should be able to just use drush
from any directory and it will automatically default to drush10:
site@instance-xxx:~$ drush --version
Drush Commandline Tool 10.3.4
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.