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.)


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)


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.

Drush helps reliable Migrate performance

If at all possible, you should execute your migrations using Drush rather than the UI for all but the smallest projects. To understand why, you need to understand a bit about how each method works.

Drush runs at the command line and is not subject to any time limits (in particular, PHP's max_execution_time does not apply). So, when you start a migration process running via drush, it simply starts up and keeps running until it's done.

When running processes through a web interface, the PHP max_execution_time (typically 30 seconds if not less) applies. Thus, for long-running processes we need to use the Batch API, which manages the breaking up of a process across multiple requests. So, a migration process will start up, run for 25 seconds or so, then stop and let the Batch API issue a fresh page request, in which the migration process is restarted, ad infinitum.

So, understanding that, why is Drush better?

It's faster

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 or the Drush repo page on Github.

The drush repo page on Github has the most latest installation instructions - visible as you scroll down that long page.


Subscribe with RSS Subscribe to RSS - drush