Minimal WordPress with Vagrant

Recently I blogged about finding a VirtualBox VM to use for experimenting with a WordPress installation. While it was cool to find an installation already set up, it lacked a couple things in my mind:

  1. There was a heavy initial download
  2. There was Bitnami branding on the wordpress site
  3. I didn’t have a good way to put changes to the VM under source control or undo changes

So I started looking around for Vagrant approaches to managing WordPress installations. One of the more popular is Varying Varying Vagrant Vagrants (VVV). I experimented with VVV for about a week, and it seemed like pretty solid solution. However, it still had some shortcomings for my use case… It has multiple wordpress installations and multiple databases intended for testing your plugin development across versions. This is great for plugin developers but with the flexibility comes additional complexity that I didn’t want. However, the biggest downside was: I still didn’t truly understand how it worked.

Here’s the problem: you don’t really understand something until you’ve built it from scratch. This goes for apple pies, houses, and software setups. And I really wanted to understand what all the pieces were (to a wordpress installation) and how they fit together so that I could make an installation that worked exactly the way I wanted.

So I did this: built my own minimal vagrant wordpress installation based on my older apache vagrant and mysql setups. It wasn’t hard to put together the parts I already knew and sprinkle in some PHP, apache configuration, and wordpress files. What the vagrant setup here gives you is:

  1. VM can be destroyed and rebuilt, but also changed and version-controlled (so long, bitnami!)
  2. Single-instance installation without the added configuration or complexity of multiple wordpress versions (so long, vvv!)
  3. Simple database backup and restore inside the VM of single database (I said, so long, vvv!)

I know this attitude of just doing it yourself perpetuates the “not built here” and “re-invent the wheel” syndromes so common in the software industry, but I feel like building something yourself is a great learning experience. Like making an apple pie from scratch. Maybe there’s a balance to be had between doing something yourself (for learning) and using the tools already built (to get actual work done).

The question for you, dear reader: when have you built something yourself rather than use an off the shelf solution? Why would you choose one option over another? I want to hear all about it!

Leave a comment

Filed under Software Engineering

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s