Quick Tip: Getting started with Vagrant and WordPress

If one wants to work from standard LAMP stack—Wordpress, in particular—the best advice in the past was to install MAMP or XAMPP to develop locally.

That worked great in the past, but now we have solutions like Vagrant, which instead creates a virtual machine with exactly the configuration you need to get started.

We’re going to take advantage of VCCW, a Vagrant configuration for WordPress plugin, theme, and website development. The project is open source on GitHub as well.

First, download and install both Vagrant and VirtualBox according to your OS.

Then, download the VCCW Vagrant box:

$ vagrant box add vccw-team/xenial64

Then, add VCCW VM to your hosts file so that you can access it via vccw.dev. (Or, you can use the vagrant-hostsupdaterplugin by installing it via vagrant plugin install vagrant-hostsupdater.)

192.168.33.10     vccw.dev

Next, download the .zip file containing all the VCCW setup files:

$ https://github.com/vccw-team/vccw/releases/download/3.2.0/vccw-3.2.0.zip
$ unzip vccw-3.2.0.zip
$ cd vccw

Finally, bring up the Vagrant environment. It will take a bit on the initial setup.

$ vagrant up

If that goes successfully, you’ll be able to visit the WordPress installation at http://vccw.dev http://192.168.33.10/.

Now, there’s a lot more that you can do to customize this installation, so be sure to check out the VCCW documentation for more details.

But, with very little effort you can establish a solid WordPress development suite for yourself, without all the hassle of running MAMP or XAMPP directly from your machine. Happy developing!