Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

What is Drush and why should I use it?

From: Simplified Drupal Sites with Drush

Video: What is Drush and why should I use it?

Before describing what Drush is, I am going to take a step back and outline what Drupal is. From a high-level perspective, Drupal is an open-source content management framework that can be used to build a content management system. By providing a highly modularized architecture, the building blocks and the base framework can have functionality added through modules and designs in themes. Drupal is used to power websites of many different scales from simple static portfolios and brochures to interactive blogs, and enterprise grade web applications and corporate sites. The management of these sites and features is done almost exclusively through an administrative web interface. By providing an interface without requiring the use of a client other than a web browser virtually anyone can build and maintain a site. This versatility comes at a price. By providing an exclusive web interface Drupal site administrators are met with a number of frustrating limitations. Each page load consists of multiple transactions. The browser makes a request, the server generates a response, and the browser interprets the response. This is a number of steps. Markup is also transferred along with CSS and JavaScript, so on and so forth. Building a page on the server takes resources and time, depending on the number of modules that are enabled, a single page request can take over 128 megs of RAM and generate dozens of database queries. An additional overhead is introduced by providing a menu and form driven user interface. Options can be buried in a maze of menu items. To clear the cache for example, I'll have to log into the site, click on Configuration, click on Performance, then click Clear all caches. From start to finish, this manual process took a lot of work. Given that these interfaces are web- based, scripting actions is impractical due to the number of HTML elements in responses that need to be parsed and interacted with. Yes, testing framework such as Selenium provide a mechanism to script activities, but in this context it's like wanting a cup of tea and flying to India, instead of just putting the kettle on. Finally, web interfaces restrict access to potentially damaging activities. I hesitate calling this a limitation as there's hundreds of fantastically good reasons for preventing someone who has just enough knowledge to do damage from wreaking havoc. With that said, sometimes it's good to pop the hood if you know what needs to be done. With that context, I can describe what Drush is. Starting with the name, Drush, stands for Drupal shell. A shell is a software that provides an interface to a particular component, typically an operating system. Shells can be command-line and graphical. Drush is a command-line shell. In particular, Drush can be used as a scripting interface, allowing groups of actions to be performed with a single command. Drush has two official pages. A website drush.org, which primarily consists of generated documentation any project page on drupal.org. Drush has been around since 2006 when it was initially developed by Arto Bendiken to manage Drupal 4.7 sites. A partial redesign and reimplementation for Drupal 5 in 2007 increased visibility of the project, which has since evolved into a full Drupal.org project maintained and expanded by the community. Today Drush supports Drupal 6, 7 and 8, and works on Linux, Mac OS, and Windows Operating Systems. Why use the command-line tool like Drush when functionality is available elsewhere in the Graphical User Interface? Most simply, Drush will save time with sheer speed and versatility. For example, clearing the cache can be done with one simple command instead of navigating through multiple menus and interfaces. Using the scriptable capabilities operations such as downloading and installing modules can be automated and placed in version control. Providing the tools that interact with Drupal from the ground up, the overhead of browser transactions is eliminated and precise actions can be performed with less chance of missing a checkbox or option. Drush is a fantastic tool that I use on a daily basis, but it has some drawbacks in terms of approachability. The documentation for Drush, while thorough and improving, can be intimidating and obtuse for people who don't live, breathe, and code a Drupal. Drush.org the homepage is an example of this. It's a very useful source for information, but it's literally dozens of commands and all of their arguments are displayed on one page. Where to start? My goal is to educate and inform about how Drush can be practically leveraged to administer Drupal sites. To do that, I will be building a fully functional Drupal site from the ground up. This includes module installation and administration, user and cache management for troubleshooting and maintenance, to copying entire sites. I will be performing all demonstrations in this course using Drush 5.8. If you look at the Drupal.org homepage, you will see the version displayed as 7.x-5.8. This is due to the way drupal.org versions files. Drush 5.8 is compatible with both Drupal 7 and Drupal 6. In this course, I will demonstrate using Drupal 7. The tools and techniques described in this course are common core functionality that should be safely future proof. In the next segments I will demonstrate how to install Drush. The README.TXT included with Drush provides installation instructions as well. Refer to them for additional guidance if needed. I'll be upfront. Installing Drush can sometimes be complicated and using Drush is actually easier than installing it. With that said, most of the time installation is easy and straightforward. I will demonstrate multiple techniques that will cover the vast majority of system setups and installation options. Not all steps are necessary for every system. Use your best judgment to determine which combination is best for your needs.

What is Drush and why should I use it?

Before describing what Drush is, I am going to take a step back and outline what Drupal is. From a high-level perspective, Drupal is an open-source content management framework that can be used to build a content management system. By providing a highly modularized architecture, the building blocks and the base framework can have functionality added through modules and designs in themes. Drupal is used to power websites of many different scales from simple static portfolios and brochures to interactive blogs, and enterprise grade web applications and corporate sites. The management of these sites and features is done almost exclusively through an administrative web interface. By providing an interface without requiring the use of a client other than a web browser virtually anyone can build and maintain a site. This versatility comes at a price. By providing an exclusive web interface Drupal site administrators are met with a number of frustrating limitations. Each page load consists of multiple transactions. The browser makes a request, the server generates a response, and the browser interprets the response. This is a number of steps. Markup is also transferred along with CSS and JavaScript, so on and so forth. Building a page on the server takes resources and time, depending on the number of modules that are enabled, a single page request can take over 128 megs of RAM and generate dozens of database queries. An additional overhead is introduced by providing a menu and form driven user interface. Options can be buried in a maze of menu items. To clear the cache for example, I'll have to log into the site, click on Configuration, click on Performance, then click Clear all caches. From start to finish, this manual process took a lot of work. Given that these interfaces are web- based, scripting actions is impractical due to the number of HTML elements in responses that need to be parsed and interacted with. Yes, testing framework such as Selenium provide a mechanism to script activities, but in this context it's like wanting a cup of tea and flying to India, instead of just putting the kettle on. Finally, web interfaces restrict access to potentially damaging activities. I hesitate calling this a limitation as there's hundreds of fantastically good reasons for preventing someone who has just enough knowledge to do damage from wreaking havoc. With that said, sometimes it's good to pop the hood if you know what needs to be done. With that context, I can describe what Drush is. Starting with the name, Drush, stands for Drupal shell. A shell is a software that provides an interface to a particular component, typically an operating system. Shells can be command-line and graphical. Drush is a command-line shell. In particular, Drush can be used as a scripting interface, allowing groups of actions to be performed with a single command. Drush has two official pages. A website drush.org, which primarily consists of generated documentation any project page on drupal.org. Drush has been around since 2006 when it was initially developed by Arto Bendiken to manage Drupal 4.7 sites. A partial redesign and reimplementation for Drupal 5 in 2007 increased visibility of the project, which has since evolved into a full Drupal.org project maintained and expanded by the community. Today Drush supports Drupal 6, 7 and 8, and works on Linux, Mac OS, and Windows Operating Systems. Why use the command-line tool like Drush when functionality is available elsewhere in the Graphical User Interface? Most simply, Drush will save time with sheer speed and versatility. For example, clearing the cache can be done with one simple command instead of navigating through multiple menus and interfaces. Using the scriptable capabilities operations such as downloading and installing modules can be automated and placed in version control. Providing the tools that interact with Drupal from the ground up, the overhead of browser transactions is eliminated and precise actions can be performed with less chance of missing a checkbox or option. Drush is a fantastic tool that I use on a daily basis, but it has some drawbacks in terms of approachability. The documentation for Drush, while thorough and improving, can be intimidating and obtuse for people who don't live, breathe, and code a Drupal. Drush.org the homepage is an example of this. It's a very useful source for information, but it's literally dozens of commands and all of their arguments are displayed on one page. Where to start? My goal is to educate and inform about how Drush can be practically leveraged to administer Drupal sites. To do that, I will be building a fully functional Drupal site from the ground up. This includes module installation and administration, user and cache management for troubleshooting and maintenance, to copying entire sites. I will be performing all demonstrations in this course using Drush 5.8. If you look at the Drupal.org homepage, you will see the version displayed as 7.x-5.8. This is due to the way drupal.org versions files. Drush 5.8 is compatible with both Drupal 7 and Drupal 6. In this course, I will demonstrate using Drupal 7. The tools and techniques described in this course are common core functionality that should be safely future proof. In the next segments I will demonstrate how to install Drush. The README.TXT included with Drush provides installation instructions as well. Refer to them for additional guidance if needed. I'll be upfront. Installing Drush can sometimes be complicated and using Drush is actually easier than installing it. With that said, most of the time installation is easy and straightforward. I will demonstrate multiple techniques that will cover the vast majority of system setups and installation options. Not all steps are necessary for every system. Use your best judgment to determine which combination is best for your needs.

Show transcript

This video is part of

Image for Simplified Drupal Sites with Drush
Simplified Drupal Sites with Drush

18 video lessons · 4343 viewers

Jon Peck
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Simplified Drupal Sites with Drush.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Learn more, save more. Upgrade today!

Get our Annual Premium Membership at our best savings yet.

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.