So, what’s Vagrant?
Create and configure lightweight, reproducible, and
portable development environments.
Slide 7
Slide 7 text
I ♥ Vagrant & friends.
Vagrant
VVV VV
Slide 8
Slide 8 text
I ♥ Vagrant & friends.
• Easy WPCLI
• Setting up sites super fast
• Always up-to-date
• No more MAMP
• Keeps your system clean
Slide 9
Slide 9 text
wp cli
Slide 10
Slide 10 text
What can you do with WPCLI?
$ wp core update
$ wp plugin install logout-roulette
$ wp scaffold post-type books
Slide 11
Slide 11 text
Setting up and managing
sites super easily!
Slide 12
Slide 12 text
Scripting site setup
• Auto-create Sublime project
• Add to SourceTree
• Open in Chrome
• Anything you can imagine
Slide 13
Slide 13 text
Installing Vagrant
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
Installing Vagrant
• Any OS works!
• Install VirtualBox (4.2.x or 4.3.6 recommended by VVV)
• Install Vagrant
http://www.vagrantup.com/downloads.html
https://www.virtualbox.org/wiki/Downloads
Slide 17
Slide 17 text
How does it actually work though?
• VirtualBox runs a VM
• Vagrant manages it
Slide 18
Slide 18 text
How to use
• Clone a box
• Start up a virtual machine
• Use it!
• Pause / Destroy it anytime
Slide 19
Slide 19 text
Commands
$ vagrant init
$ vagrant up
$ vagrant halt
$ vagrant destroy
$ vagrant provision
$ vagrant ssh
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
Varying Vagrant Vagrants
“Varying Vagrant Vagrants is an evolving Vagrant
configuration focused on WordPress development.”
Slide 22
Slide 22 text
Installation
$ vagrant plugin install vagrant-hostsupdater
$ git clone git://github.com/Varying-Vagrant-Vagrants/VVV.git
$ cd VVV
$ vagrant up
Slide 23
Slide 23 text
How VVV works
• Uses Ubuntu+Nginx
• Automatic provisioning script for WP updates
• Keeps database on host filesystem
• Easy to modify / configure
Slide 24
Slide 24 text
Sites VVV creates for you
Slide 25
Slide 25 text
http://local.wordpress.dev/ for WordPress stable
Slide 26
Slide 26 text
http://local.wordpress-trunk.dev/ for WordPress trunk
Slide 27
Slide 27 text
http://src.wordpress-develop.dev/ for trunk
WordPress development files
Slide 28
Slide 28 text
http://build.wordpress-develop.dev/ for the version
of those development files built with Grunt
Slide 29
Slide 29 text
http://vvv.dev/
Default dashboard
containing several useful
tools: PHPmyAdmin,
OPCache, links to all sites,
etc
Slide 30
Slide 30 text
VV
http://vvv.dev/
Default dashboard containing several useful tools:
PHPmyAdmin, OPCache, links to all sites, etc
https://github.com/leogopal/VVV-Dashboard
Slide 31
Slide 31 text
Helpful aliases
$ alias v=vagrant
$ alias vp="vagrant provision"
$ alias vup="vagrant up --provision && vagrant ssh"
Slide 32
Slide 32 text
Other things
• Prefer Apache?
https://github.com/ericmann/vvv-apache
Slide 33
Slide 33 text
Scripting Site Setup
https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup
Slide 34
Slide 34 text
VV
https://github.com/bradp/vv
Slide 35
Slide 35 text
Installation
• $ brew install bradp/vv/vv
Slide 36
Slide 36 text
How does it work?
Gives you a super helpful “$ vv” command
Slide 37
Slide 37 text
How does it work?
Gives you a super helpful “$ vv” command
Speeding up Vagrant Provision
• VVV looks for custom-provision.sh in provision
folder.
• You can remove the WP updates and apt-get
updates for more speed.
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
More Tips and Tricks
• Anything you do that’s repetitive, script it!
• Learn to love ‘vagrant provision’