Skip to main content

Articles tagged with "drush"

How to write your own Drush command

9th Feb 2016

Occasionally there's something you need to achieve, which would be really easy if only you could have it performed via Drush - some script that could be run on the server during an update or migration process, perhaps. But it all looks a bit too scary, right? "The task is tricky enough already, let's just do it some other way"?

Well, it's actually surprisingly easy to write your own Drush commands, and it's totally something worth learning. Let's take a look.

(Though do check to make sure you're not trying to do something that's already been done!)

Writing a

Read more

Storing data in Aegir

5th Apr 2011

Aegir is a very clever Drupal hosting system built using Drupal and Drush. It is divided into two parts: the frontend and the backend. The frontend is essentially just a standard Drupal site that stores its data in the database and then some drush scripts that manipulate the data. The backend (provision) is just a collection of drush scripts, and it stores its data in Aegir contexts which are essentially just arrays of data stored in text files on disk. One of the most mysterious processes in Aegir is sending data from the frontend to the backend to be stored...

Read more

Aegir tasks daemon

29th Mar 2011

Aegir is a very clever hosting system for Drupal that sites and provisions them on various servers and does lots of clever things. One of the clever things that it has had for a while is a task queuing system. You can ask Aegir to lots of different things all in one go, and Aegir will queue them up and run them at its own pace. This provides a really good separation from the front-end Aegir website and the back-end Aegir scripts.

We've been using Aegir in production for just under a year, and one thing that has bugged me...

Read more

Drush make, Aegir and Dropbox

7th Feb 2011

These three tools (drush make, Aegir and Dropbox) have come together to produce a release system that means I don't have to ssh into a remote server to deploy a new version of site. This means that I can do releases really, really simply, and actually with nothing more than a web browser1. Let me explain:

Drush make

If you aren't using Drush make, then you should look into it. Essentially you specify a manifest of all the code that makes up you project and then you can ask drush make to assemble the...

Read more

Views data exports

24th Nov 2010

Views is the king in Drupal land when it comes to making lists of your data, rightly so, it does a wonderful job of making it easy to choose the data you want to list. It also allows you to render your list in various forms, lists, tables. RSS feeds or even jump menus. So if you want to make a list and render it as CSV or XML, then you naturally turn to views, and find that currently you really have two options:

Let me talk about Views Datasource before...

Read more

Using Drush export content type, and views

6th Jul 2009

We're not sure what to do with these: we've written two simple Drush scripts for exporting content types and views. Saving us from having to navigate a few pages and precious seconds.

Download them and pop them somewhere Drush can find them, a good candidate would be in ~/.drush

Then you can run them by typing:

drush export view <view_name>


drush export content type <type_name>

You should now either have an error message or and exported view or content type in a file. The files are saved in the current working directory (in most cases where you ran drush...

Read more