Adam Maltpress gave a presentation last night about Varying Vagrant Vagrants. This is an open source local development tool for developing with WordPress. You can see the presentation here:
A summary of the slides above follows:
Varying Vagrant Vagrants
VVV – what the heck?
- “An open source Vagrant configuration for developing with WordPress”
- Where Vagrant is “…a tool for building and managing virtual machine
- environments in a single workflow”
- Eh?
- Run a virtual server on your computer to do WP development
- Manage settings with a simple config file
- Get a load of tools specific to, or helpful for, WordPress
- https://varyingvagrantvagrants.org/
What do you get?
- Ubuntu 14.04, nginx, PHP fpm 7.0.x, memcached, all the PHP extensions you need to run WP – hosting gubbins
- MariaDB, PHPMyAdmin – database thingies
- PHPUnit, ack-grep, Git, subversion, grunt, node, Composer, – and other workflow and development do-dahs
- WordPress current version and WordPress development version as well as WP-CLI – WordPressy whatsits.
- Everything you need to run WP on a local machine
Awesome. How do I get it?
- See https://varyingvagrantvagrants.org/docs/en-US/installation/software-requirements/
- Run CMD as administrator
- Install VirtualBox (https://www.virtualbox.org/wiki/Downloads) – I’d need “for Windows Hosts”
- Install Vagrant (https://www.vagrantup.com/downloads.html)
- Install Hosts Updater (the least reliable bit!) and test it
- Restart
Done all that. Now what?
- Clone VVV from Git
- You may need Git installed on your PC – see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- but you’re already using workflow, right?
- Start your command prompt (try doing it as an admin user on your PC)
- cd to your vagrant directory
-
vagrant up
- Wait!
- You’re up and running! Visit http://vvv.test
Woohoo! Bring me the WordPress
- Go to http://local.wordpress.test for current production WordPress
- Go to http://src.wordpress-develop.test for the development branch of
- WordPress (not yet Gutenbergy)
- Add your own sites by editing the file vvv-custom.yml in the main VVV folder:
- See https://varyingvagrantvagrants.org/docs/en-US/adding-a-new-site/
- Be careful with tabs and spaces in yml files – tabs bad, spaces good
- Edit the files the normal way on your local machine
- Use PHPMyAdmin as normal
- When you change things, run
vagrant reload --provision
on the command line
So what’s it good for?
- Contributing to WP core
- Building a theme you’re going to release
- Building a plugin you’re going to release
- Quickly getting a new, fresh WP installation running
- Learning WP-CLI
- Quickly changing PHP version to test things
What’s it bad for?
- Working with existing sites you’ve pulled down from a server
- Any sites with weird/custom folder structures
- Anything you’re moving from an existing development setup
- Beginners
- Speed of provisioning
What are the alternatives?
- Wamp
- Xampp
- Mamp
- Docker
- Plain virtual box
- Actual server
Do you recommend it then?
- Not really.