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

Chapter 5. Managing Local and Remote Environments

I remember the first time I used a Drush site alias. Someone in the team mentioned them and after reading the documentation, I set up one for the production environment. Then, to test it, I entered drush @prod.example.com core-status. Drush silently logged in to the production server, ran the command, and printed the result back to my screen. It was a revelation. Until then, running Drush commands in the production environment involved:

  • Opening a remote session with the production environment

  • Changing directory to the root of the Drupal project

  • Running Drush commands

  • Closing the remote session

The fact of being able to run Drush commands for the production environment from my local environment was mind-blowing. A stream of ideas came to my head: I would be able to check module versions, run a small piece of code to test something, download the database and files, and so on. All my respects to the Drush team (especially to Greg Anderson) for creating...