Install Drush on CentOS (with H-Sphere)

=======
Note: I'm leaving this page as is for information purposes, but I don't recommend you follow this tutorial for installing Drush. I recommend using composer to install Drush.
=======

Below is how I install Drush on CentOS systems that have H-Sphere installed as a control panel

1 - Grab a copy of Drush and untar it in your shared folder

sudo wget --quiet -O - http://ftp.drupal.org/files/projects/drush-7.x-5.9.tar.gz | sudo tar -zxf - -C /usr/local/share

Running imports and rollbacks from the UI via drush

As explained at Why you should run migrations in Drush rather than the UI, drush is a faster and more robust means of running large migration operations than the web-based UI is. As of Migrate 2.6, it is possible (with some advanced server-side configuration) to start migration operations from the UI that will run in the background via drush on the server.

Configuring background operations

To enable background imports and rollbacks requires some configuration on the server side. The key element is letting the Migrate module know where the drush command resides on the server, so it can be run. This is done by setting the Drupal migrate_drush_path variable to the full path of the drush command on the server, either in settings.php:

$conf['migrate_drush_path'] = '/usr/bin/drush';

or by setting the variable using drush:

$ drush vset migrate_drush_path /usr/bin/drush

On a windows server the path of the drush command has to include 'drush.bat', e.g. like C:\ProgramData\Drush\drush.bat.

Using Drush Rebuild

Drush Rebuild is a utility for rebuilding a local development environment from, for example, the production environment. Drush Rebuild uses Drush aliases and an easy-to-read YAML configuration file.

To use Rebuild you must know how to work with drush aliases.

Installation & configuration

Installation

Rebuild can be installed with drush or git.

Using drush: drush dl rebuild

Creating a Subtheme

@TODO

The placeholder page for Zurb Foundation 7.x documentation and will contain general information about creating subthemes.

  • Creating a subtheme
    • Manual
    • Drush

See:

http://drupal.org/node/1902848

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

It's a good idea to take a backup first:

Pages

Subscribe with RSS Subscribe to RSS - drush