A Case for Virtual Machines

When Tinkering Gets Out of Hand

As a content management system, WordPress excels at tracking your content. By simply applying a new theme, the feeling and tone of the underlying content can be perceived in new and expressive ways.

So, what do you do when you’re ready to go beyond tweaking a few lines in the CSS stylesheet and really begin developing your own themes and plugins for WordPress?

For starters, you can make the changes to files, live on your production server. This is quick, and works. But how long do you really want to be doing your development out in the open, for everyone to see?

Using XAMMP, you could make your local machine into a small development server. Similarly, if you are on any of the Ubuntu flavors, you could use one line in the terminal to download and install a fully functional LAMP server, complete with phpMyAdmin:

sudo apt-get install lamp-server^ phpmyadmin

This works well, and is a setup I use on my Xubuntu laptop to provide a lightweight sandbox for smaller PHP projects.

But at a certain point, setting up multiple WordPress installations becomes tedious.

The VM Way

A virtual machine (VM) is a simulation of a machine. Because of this, you can essentially start and stop any number of VMs on one physical machine, the only real limit is the performance of the underlying hardware.

At the end of the day, this VM is just software, which means we can do ‘software things’ to it!

  • For a backup, copy the machine to an external location.
  • To transfer a project to someone else, simply transfer the VM.
  • New projects can quickly be cloned from an existing VM.

Doing any of these things using XAMMP, or the localhost of our development machine, would require copying the files, along with extracting content from the database. Do-able. And tedious.

And the drawbacks to VMs? There is one, and it is significant. VMs can be huge, taking up a few hundred megabytes of memory for each WordPress installation.

Still, the gains of a transferable package, and isolated environment, make a strong case for using a VM.

By the way, did I mention that a lot of the grunt work of setting up useful VMs has already been done:

If you’re still intrigued: read about Setting Up Virtualbox in Xubuntu for WordPress Development.


Posted

in

by

Tags: