WordPress & Vagrant

23
WordPress & Vagrant

Transcript of WordPress & Vagrant

Page 1: WordPress & Vagrant

WordPress & Vagrant

Page 2: WordPress & Vagrant

What is Vagrant?

Page 3: WordPress & Vagrant

– docs.vagrantup.com

“Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.

Page 4: WordPress & Vagrant
Page 5: WordPress & Vagrant

Vagrant makes sandboxeswe play in them

Page 6: WordPress & Vagrant

What does that mean?+ self-contained, isolated environments

+ reproducible and disposable

+ matches production environment

+ clean

+ fast

+ dependable

Page 7: WordPress & Vagrant

basic terminal commands+ cd+ vagrant up+ vagrant destroy

Page 8: WordPress & Vagrant

bonus terminal commands+ ls+ mv+ cp+ vagrant halt+ man

Page 9: WordPress & Vagrant

Developing WordPress sites with Vagrant

Page 10: WordPress & Vagrant

$

WordPress codebaseWordPress codebase

Vagrant Workflow

Page 11: WordPress & Vagrant

vagrant virtual machine

$ vagrant up

WordPress codebaseWordPress codebase

Vagrant Workflow

Page 12: WordPress & Vagrant

$

WordPress codebase

vagrant destroy

Vagrant Workflow

Page 13: WordPress & Vagrant

WordPress Vagrant Projects+ VVV (Varying Vagrant Vagrants)

+ Trellis (a part of the roots.io project)

+ Salty-WordPress

+ VCCW

+ and plenty more

Page 14: WordPress & Vagrant

Common pitfalls+ Full provisioning

+ Long wait on vagrant up

+ Precious

+ Lots of idiosyncratic upfront configuration

+ Most can’t run multiple simultaneous VMs

+ Lousy with managed hosting

Page 15: WordPress & Vagrant

Managed WordPress Hosting

+ WordPress hosting is a solved problem

+ Small teams can do more

+ peace of mind

Page 16: WordPress & Vagrant

Development Environment Design Goals

+ Fast to set up

+ Always install the latest WordPress release

+ Pre-bake common components into a standard base box

Page 17: WordPress & Vagrant

+ Apache and mods

+ PHP

+ PHP error reporting

+ MySQL

+ Setup user accounts

+ Configure server

+ define default sites

+ etc.

basic-wordpress-box basic-wordpresss-vagrant

Page 18: WordPress & Vagrant

+ Apache and mods

+ PHP

+ PHP error reporting

+ MySQL

+ Setup user accounts

+ Configure server

+ define default sites

+ etc.

+ Install & configure WordPress

+ Load Database

basic-wordpress-box basic-wordpresss-vagrant

Page 19: WordPress & Vagrant

Advantages of basic-wordpresss-vagrant

+ Very, very fast to spin up

+ Virtually no configuration

+ Low technical barrier to entry

+ Multiple simultaneous VMs work great

+ Lightweight, VM saves disk space

Page 20: WordPress & Vagrant

How fast?

V V V vagrant up

23 minutes 10 seconds

Trellis (Roots.io) vagrant up

10 minutes 40 seconds

Elapsed time from “cold boot”

Page 21: WordPress & Vagrant

How fast?

V V V vagrant up

23 minutes 10 seconds

Trellis (Roots.io) vagrant up

10 minutes 40 seconds

basic-wordpress-vagrant vagrant up

51 seconds

Elapsed time from “cold boot”

Page 22: WordPress & Vagrant

DEMO

Page 23: WordPress & Vagrant

GitHub /ideasonpurpose/basic-wordpress-vagrant

/joemaller

[email protected]