Drupal - How do I use Drush 8 site aliases in Drush 9?

Aliases are now provided in YAML files. According to the example aliases file for Drush 9:

To convert legacy alias (*.aliases.drushrc.php) to yml, run the site:alias-convert command.

So running the command:

drush site:alias-convert

should do the trick.


Clive's answer is a start, but as TheRealWebGuy notes, there is another step you must take.

I was upgrading from drush 8 to drush 9, and my aliases still did not work after running drush site:alias-convert. An additional step that I needed to take for my new alias files to work was to run drush init. I ran it in my user home directory; I don't know if that matters.

Hopefully this saves future users some additional clicking and searching.

Tags:

Drush