I have a stage and an anonymized instance of a project both managed under the same user (www-data). The anonymized instance is taken from production instance and has a drush extension that can have a different version than the stage instance.

With one instance per user I can simply symlink the extension to the ~/.drush folder, but how would I do that with two different versions of the same extensions? Is there a way to define alias dependent extensions in Drush? If Drush does not support this, what would be a good OS work around?


Instead of installing the drush extensions in a user specific scope within your user's profile, you can install them on a per-project (Drupal instance) base in your {PROJECT_ROOT}/drush folder.

Drush 9 checks for the existence of a drush folder one level above the Drupal web root.

This is easiest to manage by utilizing Composer for dependency management and adding a Drush installer path, Drush and any Drush extensions to the composer.json file. But of course you can also setup everything by hand.

  • Yes it is Drupal 7 and the first suggestion works for me! Thank you!
    – ñull
    Jan 16 '18 at 11:59

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.