Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Extremely Powerful Local WordPress Development with Vagrant and Friends
Brad Parbs
July 25, 2015
Technology
1
90
Extremely Powerful Local WordPress Development with Vagrant and Friends
Brad Parbs
July 25, 2015
Tweet
Share
More Decks by Brad Parbs
See All by Brad Parbs
bradp
0
83
bradp
1
150
bradp
3
45
bradp
0
210
bradp
2
170
bradp
1
60
bradp
4
170
bradp
2
170
bradp
1
90
Other Decks in Technology
See All in Technology
kanaugust
PRO
0
190
hhiroshell
9
530
ozuma
0
130
soracom
0
140
miura55
0
120
yosshi_
3
370
nozomiito
0
240
kraj
0
5.2k
hmatsu47
0
210
redhatopenshift
0
860
recruitengineers
0
140
shirayanagiryuji
1
2.2k
Featured
See All Featured
trallard
13
650
chriscoyier
145
19k
productmarketing
5
660
smashingmag
283
47k
yeseniaperezcruz
302
31k
rmw
11
750
malarkey
393
60k
rocio
155
11k
hatefulcrawdad
257
17k
denniskardys
220
120k
colly
187
14k
michaelherold
225
8.5k
Transcript
(and it has some real neat friends)
I’m Brad Parbs • Developer @ WebDevStudios • Push code
to http://github.com/bradp • http://brad.party
Let’s talk about local development environments.
Let’s talk about local development environments.
Let’s talk about local development environments.
So, what’s Vagrant? Create and configure lightweight, reproducible, and portable
development environments.
I ♥ Vagrant & friends. Vagrant VVV VV
I ♥ Vagrant & friends. • Easy WPCLI • Setting
up sites super fast • Always up-to-date • No more MAMP • Keeps your system clean
wp cli
What can you do with WPCLI? $ wp core update
$ wp plugin install logout-roulette $ wp scaffold post-type books
Setting up and managing sites super easily!
Scripting site setup • Auto-create Sublime project • Add to
SourceTree • Open in Chrome • Anything you can imagine
Installing Vagrant
None
None
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
How does it actually work though? • VirtualBox runs a
VM • Vagrant manages it
How to use • Clone a box • Start up
a virtual machine • Use it! • Pause / Destroy it anytime
Commands $ vagrant init $ vagrant up $ vagrant halt
$ vagrant destroy $ vagrant provision $ vagrant ssh
None
Varying Vagrant Vagrants “Varying Vagrant Vagrants is an evolving Vagrant
configuration focused on WordPress development.”
Installation $ vagrant plugin install vagrant-hostsupdater $ git clone git://github.com/Varying-Vagrant-Vagrants/VVV.git
$ cd VVV $ vagrant up
How VVV works • Uses Ubuntu+Nginx • Automatic provisioning script
for WP updates • Keeps database on host filesystem • Easy to modify / configure
Sites VVV creates for you
http://local.wordpress.dev/ for WordPress stable
http://local.wordpress-trunk.dev/ for WordPress trunk
http://src.wordpress-develop.dev/ for trunk WordPress development files
http://build.wordpress-develop.dev/ for the version of those development files built with
Grunt
http://vvv.dev/ Default dashboard containing several useful tools: PHPmyAdmin, OPCache, links
to all sites, etc
VV http://vvv.dev/ Default dashboard containing several useful tools: PHPmyAdmin, OPCache,
links to all sites, etc https://github.com/leogopal/VVV-Dashboard
Helpful aliases $ alias v=vagrant $ alias vp="vagrant provision" $
alias vup="vagrant up --provision && vagrant ssh"
Other things • Prefer Apache? https://github.com/ericmann/vvv-apache
Scripting Site Setup https://github.com/varying-vagrant-vagrants/vvv/wiki/Auto-site-Setup
VV https://github.com/bradp/vv
Installation • $ brew install bradp/vv/vv
How does it work? Gives you a super helpful “$
vv” command
How does it work? Gives you a super helpful “$
vv” command
Commands • $ vv create • $ vv delete •
$ vv list
Advanced Commands • $ vv --deployment-create • $ vv --blueprint-init
• $ vv -v up
Developer Workflow (live demo ?)
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.
None
None
More Tips and Tricks • Anything you do that’s repetitive,
script it! • Learn to love ‘vagrant provision’
None