How to run Drush and other server side commands in a module

I am preparing to release my blog, rjtownsend.com, as a Drupal distribution in the next week or so, "when it's ready" as is commonly said in the Drupal community. One of the pieces I was working on this last weekend was a demo-mode module that uses Drush to generate content during install. Here's how I did it.

How to setup a local development environment for Drupal 7 on Ubuntu 12.04 with apache, mysql, php, svn, git, eclipse, dnsmasq, and Drush

My hard drive crashed this last week and I ended up setting up a local dev environment on Ubuntu on a couple machines. Here are the steps I took; this should get anyone to a place where they're ready to start Drupal development on a local machine. In a nutshell, this how-to includes installing and configuring Ubuntu 12.04, Apache 2.2 (including virtual hosts configuration), MySQL 5.5, PHP 5.3.x, phpMyAdmin, SVN 1.7, Git, Eclipse (with PDT, Remote System Explorer, Subclipse, Egit), dnsmasq, and Drush.

Subscribe to code snippets