Helpful Drush Commands

The Omega 4.x base theme comes with built-in Drush integration to extend the core commands of Drush itself for various Omega 4.x and theming related tasks.

Prerequisites

The following guide assumes that you already have Drush installed and running.

In previous versions, the Omega theme Drush integration was provided by a module (Omega Tools). However, the maintainers of Drush recently added command discovery for themes which now allows us to ship the Drush integration directly with the Omega theme instead of maintaining a separate module. Omega Tools has consequently been deprecated and will no longer be maintained for the 4.x version of Omega.

Please do not install Omega Tools when running Omega 4.x. It might overlap/collide with the Drush integration provided by the theme.

Getting started

Once you have Drush installed and working you can download Omega 4.x by navigating into your Drupal directory and issues the following command.

drush dl omega

This will automatically download and place Omega 4.x in sites/all/themes/omega.

Drush has an internal cache that you may have to clear in order to make use of the Omega related commands. The following command clears the internal Drush cache.

Using Drush to update to a specific version of core (not just the latest)

By default, the drush pm-update command will update Drupal core and all enabled projects to the latest recommended releases. The optional project argument allows you to provide a list of installed projects to update, thereby limiting the scope of the update.

You can also pass a specific version of Drupal core as a project argument and Drush will limit the upgrade to that version of core (and core only, unless you pass other projects along as arguments.)

Example:

drush pm-update projects drupal-6.28

Integrating Drush on Windows XP/7/8 with Git Bash

There are additional configuration steps needed to get Drush to work with git bash. This is due to the Drush Windows Installer package not having a couple necessary configuration options enabled by default to provide proper integration with git bash.

Fresh Drush Installation

When installing drush using the Drush 5.7/5.8/6.0 Windows Installer, this screen will appear:
custom setup options during a Drush install
There are three boxes that are marked "X" (not installed).

Click the box titled "Register Environmental Variables", then choose "Entire feature will be installed on local hard drive".

Drush installation step2

Then, click the box titled "cwRsync Optional Component box", then choose "Entire feature will be installed on local hard drive". Enabling this option will (with a few other tweaks) enable you to use the drush rsync command.

Proceed with the installation.

The "Register Environment Variables" option will update the PATH so that git bash knows where to find drush.

Fixing An Existing Drush Installation

Advanced debugging of Drupal core using the command line (strace & tcpdump)

Basics

Debugging of Drupal was never easy, until you know the right tools and how to use them.

There are plenty of alternative debugging methods using some popular PHP libraries XDebug, XHProf, NuSphere PhpED, etc. and also most of the IDE have already built-in step-by-step debugger.

Using Drush to install, upgrade and work with Drupal projects

Instructions for installing, enabling and upgrading projects with Drush appear on the pages below.

Specific instructions for installing Drush on different platforms

For more details about drush project, please see the Drush project page.

The recommended installation instructions can be found here: http://docs.drush.org/en/master/install/
Abreviated instructions:
First install Composer globally.

Pages

Subscribe with RSS Subscribe to RSS - drush