Drush User's Guide
Copyright 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2012
Production Reference: 1020412
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK..
ISBN 978-1-84951-798-0
www.packtpub.com
Cover Image by Asher Wishkerman ( <>
)
Credits
Author
Juan Pablo Novillo Requena
Reviewer
Greg Anderson
Jonathan Araa Cruz
Acquisition Editor
Joanna Finchen
Technical Editors
Naheed Shaikh
Vishal D'souza
Project Coordinator
Michelle Quadros
Proofreader
Elinor Perry-Smith
Indexer
Hemangini Bari
Production Coordinator
Prachali Bhiwandkar
Cover Work
Prachali Bhiwandkar
About the Author
Juan Pablo Novillo Requena started building PHP websites professionally in London right after finishing his University studies in 2006. He spent some time using Symfony and Ruby on Rails and in 2010, back in Spain, he created his first website with Drupal. His commitment with the Drupal Community started a year later once he discovered how much fun and challenging it was to contribute. Currently, he maintains several modules such as Twitter and Oauth among others, he frequently submits and reviews patches for other projects (recently Drush), he participates in the Madrid and Spanish communities with talks and code sprints and overall he does his best to help Drupal evolve and get known to a wider audience.
Juan's Drupal profile can be found at http://drupal.org/user/682736.
I would like to thank Lorena for her everyday support in my career and life. My family for believing in me and for being so helpful. Also, thanks to my colleague Tushar Mahajan (http://drupal.org/user/398572), whose passion for Drupal and guidance was what got me into all this up to a level I could not even imagine.
About the Reviewer
Greg Anderson is one of the co-maintainers of Drush; he is the original author of site aliases and the sql-sync command. You can follow him at http://twitter.com/greg_1_anderson.
Jonathan Araa Cruz has been a sysadmin since early 2000 and has been involved with Drupal since 2006, when a site built by others fell in his hands. At present, he combines both sysadmin and Drupal development work. He has published some modules to aid migration from other CMS options to Drupal. He regularly contributes patches to modules he works with. At a point in time, he found Drush and saw a lot of possibilities in the management of Drupal from the command line. So, he started to contribute patches to improve Drush. Since 2010, he has been an official co-maintainer of the project.
Jonathan's Drupal profile can be found at http://drupal.org/user/49817.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
Drush is a command line interface for Drupal. Most of the tasks for building and maintaining a website are repetitive and involve filling in forms on administration pages. The majority of these tasks can be achieved with a single Drush command, drastically shortening the development and maintenance time of a project.
What this book covers
, Installation and Basic Usage , starts with a couple of jaw-dropping examples, followed by an introduction to Drush, and then focuses on installation, usage, and some basic concepts.
, Executing Drush Commands , shows how common site-building and administration tasks in Drupal projects can be performed faster and easier using Drush commands, right after it has been installed. In order to demonstrate this, a sample Drupal project will be installed, configured, extended, monitored, and tested using Drush commands.
, Customizing Drush , dives into advanced topics such as writing and altering commands, executing scripts, working with site aliases and configuration files, and customizing our terminal.
, Extending Drush , expands the Drush toolkit by installing and testing contributed modules which implement new Drush commands.
What you need for this book
To run the examples in the book, the following software will be required:
# | Software Name | URL |
---|
| Ubuntu | http://www.ubuntu.com/ |
| MAC OS X | http://www.apple.com/macosx |
| PHP | http://www.php.net/ |
| MySQL | http://www.mysql.com/ |
| Apache | http://www.apache.org/ |
| Drupal 7 | http://drupal.org |