How to install Drush on a Mac

Description

Collection: Change Management and Version ControlChapter: How to Install Drupal, Manage Features and Perform Common Tasks Using Drush

Transcript

In order to use Drush, you first need to install it. So we're going to go through the installing process for a Mac here. I'm going to do a Google search for Drush and I'm going to click on the topmost link which is on Drupal dot org.

I'm going to scroll down here and we can download version for 4 or 5. Now, the latest version of Drush is 5 so let's go ahead and download that. Once it's downloaded, go ahead and unpack it, and we're going to take this whole folder and put it in some permanent place on our hard drive.

Normally, we might put this in a bin folder, but for now, we're just going to put it in the root of our hard drive. So I'm going to go ahead and copy it and I'm going to navigate to the hard drive, and I'm going to go ahead and paste it in. Okay.

So now we have Drush in the root of our hard drive. So now, we need to specify our terminal or our command line to create an alias for this. So instead of pointing to the Drush script which is within the Drush folder right here every time we want to run Drush, we can instead type just Drush on the command line in order to invoke the command.

So we simply need to create an alias in one of the files that runs before a terminal or a command line session is started. So one of these files is the . bashrc file which resides in our home directory.

In this series we uncover how to use powerful tools to speed up and stabilize the Drupal development process. We begin with a thorough walk-through of Git, the version control system. After we cover how to patch modules and upgrade Drupal from one minor version to another, we demonstrate how to use the Features module to version control components of Drupal that aren't typically available to version control. Finally, we wrap up with how to integrate Drush - a powerful command line tool for Drupal - into your workflow to speed up the process of doing everything we discussed earlier in the series.

Some of the key points we'll be covering include:

How to use the command line

How to work with the Features module to capture important database changes and make deployment easier.

How to use Git for version control

Best practices for working on a Drupal team

Who this collection is for

This video collection is mainly for developers who want to improve their deployment strategies and learn how to work on a shared Drupal code base with other developers. However, even if you are not a developer, our coverage of using Features and version control is extremely valuable for deploying Drupal sites and sharing reusable components between projects.

Prerequisites

Even if you are not a developer, you will be able to follow with most of this collection. When we talk about code we do not go into detail about the basic components of the code, so you may want to brush up on some coding basics in the "PHP Programming Basics" collection.

It looks like there might be an issue playing videos in this browser. We're working on better cross-brower experience, but in the meantime please try the latest Chrome or Firefox browsers. Or, you may be able to watch the video directly without progress tracking or transcript: