At this point in the book, you may have already executed quite a few commands. Some of them need a long list of attributes and options in order to behave as your needs demand. Plus, you always have to take care of being at the root of your Drupal site. Moreover, if you use named sites in your sites
folder instead of using the sites/default
directory, you always have to add the --uri
option or execute commands from the settings.php
path. This is annoying and makes command typing tiresome and prone to error.
Enter Drush Site Aliases. A site alias is a short name that defines several options about a local or remote Drupal site such as where it is located, what is the username, host to log in via SSH, which sites has it defined at its sites directory, and many more. Think of it as an array with options.
We will first explain what are the benefits of setting up local site aliases, and then go one step further and start invoking Drush commands to...