Super simple example of local drush alias configuration

So I have a folder for drush scripts _above_ several doc root folders on a dev user's server. And I want to run status or whatever and my own custom drush scripts on _different_ Drupal web app instances. Drush has alias capability for different site instances, so you can do:

$ drush @site1 status

So, how to set up an aliases file?

(I'm on Ubuntu with Drush 6.2.0 installed with PEAR as per this great d.o. doc page Installing Drush on Any Linux Server Out There (Kalamuna people, wouldn't you know it?)).

Careful reading of the excellent drush documentation points you to a Drush Shell Aliases doc page, and from there to the actual example aliases file that comes with every drush installation.

So to be able to run drush commands for a few of my local Drupal instances, I did this:

  • In my Linux user directory, I created the file ~/.drush/aliases.drushrc.php
  • Contents:

$aliases['site1'] = array(
  'root' => '/home/thevictor/site1/drupal-yii',
  'uri' => 'drupal-yii.example.com',
$aliases['site2'] = array(
  'root' => '/home/thevictor/site2',
  'uri' => 'site2.example.com',

Then I can do, from anywhere as long as I am logged in as that user:

$ cd /tmp
$ drush @site1 status
$ drush @site2 status

and lots of other good stuff. Have a nice weekend.

Getting comfy with the VirtualBox based Bitnami LAMP Virtual Machine Stack for Drupal Development

A few days ago I shared my experience in setting up Bitnami LAMP Virtual Machine Stack using VirtualBox for Drupal development on my MacBook Air. That article serves well for the initial setup with the latest version of VirtualBox. Now, a few days later, I would like to share "what I really had to do" to get comfy with this local laptop/workstation development environment, the actual steps necessary for acquiring a truly useful tool.

Short List ("back to work")

  •    Obtain IP of running Bitnami Guest unless you are using static IP (recommended)
  •    Fix Local IP in /etc/hosts and login with terminal
  •    Mount codebase via sshfs and work with IDE, Atom, Sublime, etc. or else use Eclipse remoting.

Long List ("Let's get a Drupal project up and running and get back to work already")

  •    Static address
  •    Set hostname and server names on Guest if not using Static address
  •    Fix Local IP in /etc/hosts/ and login with terminal
  •    Make sure terminal is bash and not dash
  •    Checkout codebase
  •    Set files permissions and refresh files via rsync
  •    Create database via http://phpmyadmin.bitnamilampvm
  •    Refresh db via rsync if not included in codebase and load local db
  •    Setup local /etc/hosts, in the Guest vm setup the virtual hosts, and restart apache
  •    Run in browser
  •    Mount codebase via sshfs and work with IDE, Atom, Sublime, etc. or else use Eclipse remoting

Bitnami LAMP Virtual Machine Stack using VirtualBox for Drupal development

Work Local with your favorite editor or IDE! Then deploy wherever

I have previously written about the great Kalabox dev environment which is especially useful in the development process if you are using Pantheon hosting. When you install that, you automatically get VirtualBox installed.

Using VirtualBox you can work with other cool virtual machine images, like Bitnami, for example. In this article we learn how to setup a no-nonsesense Lamp virtual machine using the Bitnami LAMP Stack Virtual Appliance riding on VirtualBox, with no-nonsense virtual host based Drupal instances accessible anywhere on your network, and you can use a best-practices based process workflow with an Ubuntu server running right on your Windows, Mac or Linux laptop.

Quo vadis? Native Installer or Virtual Machine?

Downloading and unpacking

Creating the virtual machine instance

Login and configuration

Installing drush

Take a snapshot and stop the virtual machine

Set up Drupal Instances with Drush and Virtual Hosts, not Bitnami Drupal modules

Look Ma, responsive embedded youtube videos in Kalatheme

So Kalatheme "ships with many responsive layouts, templates and tools right out of the box" and is built right on top of Panopoly (think responsive panels, panelizer...). But I used the built in Media capabilities to stick a video field into a news article application, and it was stuck in big. So I got a quick fix from this article by John Surdakowski, and applied it in just a few lines of CSS in my Kalatheme based sub-theme's css/main.css file:

/* Responsive you-tube video */
.media-youtube-video {
.media-youtube-video iframe {

This is a bare-bones approach, but works splendidly in Kalatheme, and should work with other module sets and themes also, after having identified the iframe container div classes, and the appropriate iframe classes.

Pantheon Workflow Solution on Kalabox - Boomshakalaka!

In Kalatheme in Kalabox on Pantheon for a minute about time, we pulled down a Kalatheme based sub-theme into a recently installed Kalabox on our laptop, so we could run it locally and work on the project using Eclipse or any other IDE.

In this article we explore a simple but realistic Git-based workflow for Multidev and non-Multidev topic branches of a Pantheon dev project.

Syndicate content