Book Image

Drush for Developers - Second Edition

By : Juan Pablo Novillo Requena, Juan P Novillo Requena
Book Image

Drush for Developers - Second Edition

By: Juan Pablo Novillo Requena, Juan P Novillo Requena

Overview of this book

Table of Contents (13 chapters)
Drush for Developers Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Keeping Database Configuration and Code Together
Index

Special site aliases


We defined two site aliases for our project: one for the development environment and one for the production environment. However, when we list all the available site aliases, we see a few extra ones:

$ cd /home/juampy/projects/example
$ drush site-alias
example
example.dev
example.local
example.prod
none
self

We can see that this project has six Drush site aliases. We are aware of @example.local, @example.dev, and @example.prod, but what about the others? Those are site aliases defined by Drush automatically. We will explain each of them in the following sections through examples.

Running a command on all site aliases of a group

The example alias is a group site alias for our example project. If you prepend a command with it, the command will be executed on all the site aliases defined under this group. Our example.aliases.drushrc.php file defines two aliases: dev and prod. This can be useful for analysis tasks such as to check which version of a module each environment...