Jumpstart Your Site with Drush Make

Drush is an amazing tool for managing nearly all aspects of a Drupal site and my latest trick is using Drush to pull in all of my favorite modules for a new build. There are plenty of ways to get modules downloaded to a project, but Drush's make command is a clean and powerful tool for the job.

If you want to try it out take a look at my example makefile. Download it, rename it to base.make, then go to the root of your Drupal site and run the command below. Drush will run for a few moments, then you'll see it pulling in all of the modules, themes, etc.

drush make --no-core path/to/base.make

This is a very basic usage of Drush's make command but there are a few key things to notice.

The syntax used to specify modules indicates which directory of the modules folder I would like the modules to be loaded into. I've configure this to load the contributed modules into a "contrib" directory, a good practice to use for keeping your modules organized. A simpler syntax is provided where I indicate the themes to download.

I regularly use the WYSIWYG module with the CKEditor library. Let's not argue over why, as the how is the important part. WYSIWYG needs a few adjustments needed to utilize CKEditor 4, and these are already included in the development release. I could specify Drush to use the dev version but instead I've chosen to load this module at a commit just after the fixes went in that has been tested and proven stable.

One of the biggest benefits to using Drush make is the abiity to automate the installation of 3rd party libraries. This is what I've done with the CKEditor WYWIWYG library. This allows Drush to find the files on CKEditor's website, download the library, and unzip it into Drupal's sites/all/libraries folder. Huge win.

Feel free to use this and enhance as you see fit. Be sure to comment back with any tips and tricks. Happy Drush make-ing.