This document summarizes a presentation on Drush, a command line shell for Drupal. Drush allows users to perform administrative tasks in Drupal like flushing caches, installing/updating modules, and managing users from the terminal with just a few commands. The presentation covers what Drush is, why it's useful, how to install it, and examples of common tasks like flushing caches, handling modules, and managing the database and users. It concludes with information for contacting the presenter.
Advanced Flow Concepts Every Developer Should Know
Hong Kong Drupal User Group - Introduction of Drush
1. Hong Kong Drupal User Group
Introduction of Drush
Francis Yan
2014 Oct 11th
2. Francis Yan
● COO, PantaRei Design
– kpyan8s@pantarei-design.com
● Drupal user, site builder
– https://www.drupal.org/u/kpyan8s
● HKDUG Organizer
– https://groups.drupal.org/drupalhk
3. PantaRei Design
● Hong Kong based Free and Open Source Software (FOSS) service provider
– Content Management System (CMS) with Drupal
– Cloud hosting with Amazon Web Services (AWS)
– Team collaborate solution with Atlassian
● Business Partnership
– 2012 - AWS Consulting Partner
– 2013 - Acquia Partner
– 2013 - Atlassian Experts
– 2014 - Rackspace Hosting Partner
● FOSS Contributor
– 2008 - Hong Kong Drupal User Group Co-founder
– 2012 - Drupal Services Provider
4.
5.
6.
7. Outline
● What is Drush?
● Why Drush?
● Installation of Drush
● Some general use cases
● Q & A
8. What is Drush?
● A command line shell and Unix scripting interface for
Drupal
● Ships with lots of useful commands for interacting
with code, e.g.
– modules/themes/profiles
● Drush was originally developed by Arto for Drupal
4.7. Druapl 4.7 released at 2006 May 1st.
● In May 2007, it was partly rewritten and redesigned
for Drupal 5 by frando
9.
10. Why Drush?
● It helps you perform various admin tasks using
just one or two commands in the terminal
● It replace the need for many clicks and page
refreshes in the UI.
11. Installation of Drush
● Composer install / update
– 3 command lines only in my case
● Manually install
– Guideline : https://github.com/drush-ops/drush
12. Some general use cases
● Flushing the cache
● Install / enable / disable / update modules
● Create / delete user, reset password of user
● Backup and restore database
13. Flushing the cache
● Important for reviewing latest result in Drupal
● Command:
– drush cc all
14. Handle modules with Drush
● Take views module as an example
● Install views
– drush dl views
● Enable views
– drush en views
● Disable views
– drush dis views
● Update views
– drush up views
15. Handle user with Drush
● Create user
– drush user-create username
--mail="email@example.com"
--password="password"
● Delete user
– drush user-cancel username
● Reset password of user
– drush user-password admin
--password="new_pass"
19. Thank You
● Please feel free to contact us:
– Unit 207, 2/F IC Development Centre, No.6 Science
Park West Avenue, Hong Kong Science Park,
Shatin, N.T.
– +852 3576 3812
– http://pantarei-design.com/
– sales@pantarei-design.com