WordCamp Notes - Local Development with Vagrant and VVV, Jonathan Trujillo

November 12, 2015

Step 1 -- set up a VM
Works with Virtual Box (by default)
also works with VMWare and WorkStation
VMWare is more efficient than Virtual Box

Step 2 - Install Vagrant
installers available for mac, windows and linux

Step 3 --
terminal : vagrant -v
will return the version of vagrant that's installed (if it was installed successfully)

helpful commands --

vagrant up
when you get the VM set up, "vagrant up" starts up the machine, provisions it, etc.

vagrant halt
to shut down the VM

vagrant ssh
logs you in to the server and gives you the ability to do ssh commands in the VM

vagrant suspend
similar to "halt"
takes a snapshot of the VM, does a "soft shutdown", stops using the resources on your laptop
makes it easier to restart than "halt"
ala a "sleep" command

vagrant resume
wakes a server back up after a "suspend"

VVV --
Vagrant env that's config'd for WordPress dev (or whatever you want)
Started life as a 10up project, now maintained by it's own community
Includes
Ubuntu
nginx (or apache if you want)
4 standard WP installs
WP-CLI
and more

Install the Vagrant Plugin "vagrant triggers"
creates backups of all the databases in your VM. so if you need to destroy your vagrant VM, you don't lose any data.

Clone the VVV into a "vagrant-local" directory
git clone git://github.com/...

change directory into a vagrant-local and "vagrant up"
cd ~/vagrant-local && vagrant up
grabs all the stuff it needs to create that dev server
(this part takes a while, it downloads various things, the disk image, etc)

what just happened --
setup your ubuntu dev box
creates an instance of ubuntu server on your machine in VM
creates a site at vvv.dev w/ links to the tools that are bundled with VVV
setup the default WP installs (4 different notes)
latest stable, trunk, src build and "build build" sites

Some tools for working with VVV --

VVV Dashboards
different flavors, can create your own
takes vvv.dev site in the VM (links to the dev urls) and creates a Bootstrap-esque dashboard instead
includes a cheat sheet of vagrant commands, some other reference material, etc.

VVV Site Wizards --

Variable VVV
ability to type "vv create", answer a couple questions, and it builds your site install

Vagrant Manager --
mac/win app
installs a toolbar so you can do vagrant commands from the system toolbar instead, can manage your VMs from here, start/stop the VMs, etc.

Other Vagrants WP projects --

Mecury Vagrant

Trellis