3

I installed in my PC drush 8 for develop on Drupal 8, but I need drush 7 for connect with my sites on remote servers. I download manually drush 7 but when I try to open said me:

Unable to load autoload.php. Drush now requires Composer in order to install its dependencies and autoload classes. Please see README.md

Then, How I install two versions of Drush in my PC?

  • Have you seen README.md? – Mołot Jul 8 '15 at 18:17
  • @Mołot yes, but the only options what i found was install with composer and then it, update the version from dev to 7.x, not allow two versions, I think. – rpayanm Jul 8 '15 at 18:48
  • 1
    possible duplicate of Drush from GitHub stopped working – kenorb Aug 25 '15 at 11:31
1

If you want install different version of drush I recommend you try this tutorial (for me it's a very clear way to do it), and for aliasing check out this tutorial.

2

Drush 8 should work just fine with remote sites running Drush 7.

To get around the error message you are seeing, run composer install from the Drush directory.

If you want to install multiple versions of Drush to run locally, the easiest way to do it is to manage your Drupal site with Composer, and add a 'require drush' line in your composer.json. If your global Drush is at least version 7, then you will find that Drush automatically dispatches to the site-local Drush whenever you target it.

One really good use-case for doing this would be to run Drush 7 stable as your global Drush, but use Drush 8 with any Drupal 8 site.

See also:

https://github.com/drupal-composer/drupal-project https://github.com/pantheon-systems/example-drupal7-composer

  • Thank you @greg_1_anderson When I run drush @server.dev status I got /bin/bash: drush8: command not found. – rpayanm Jul 8 '15 at 22:22
  • Did you set %drush-script to drush8 in your alias file? By default, Drush should try to run drush on the remote server. Whatever script name is used will need to be in your $PATH on the remote site. Make sure that you set your $PATH at the top of your .bashrc file; a lot of distro's exit early, near the top of .bashrc when called in non-interactive mode, which can prevent Drush backend invoke from being able to find the remote Drush executable. – greg_1_anderson Jul 8 '15 at 22:27
  • 1
    Ups... the drush versions on the server is 6.6.0 :( – rpayanm Jul 21 '15 at 21:10

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.