Top Banner
Chris Olbekson WordPress Developer Twitter: @chris_olbekson Houston, TX
29

Magical WordPress Development with Vagrant

May 17, 2015

Download

Technology

Chris Olbekson

Magical WordPress Development with Vagrant. WordCamp Austin 2014 by Chris Olbekson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Magical WordPress Development with Vagrant

Chris Olbekson !

WordPress Developer Twitter: @chris_olbekson Houston, TX !

Page 2: Magical WordPress Development with Vagrant

Magical WordPress Development With

Vagrant

Page 3: Magical WordPress Development with Vagrant
Page 4: Magical WordPress Development with Vagrant

Chris Olbekson @chris_olbekson

$ fink remove --recursive daemonic xinitrc $ sudo rm -rf /opt/local $ brew tap josegonzalez/homebrew-php $ brew install php53 —with-fpm —with-mysql nginx mysql $ echo export PATH="$(brew —prefix josegonzalez/php/php55)/bin:/usr/local/ bin:$PATH” > ~/.bash_profile

Fink Brew

Page 5: Magical WordPress Development with Vagrant
Page 6: Magical WordPress Development with Vagrant
Page 7: Magical WordPress Development with Vagrant
Page 8: Magical WordPress Development with Vagrant

Vagrant

Page 9: Magical WordPress Development with Vagrant

How did we get here? !

Page 10: Magical WordPress Development with Vagrant
Page 11: Magical WordPress Development with Vagrant

My WordPress Toolbox circa 2005

Connect to a remote machine (usually I do development on my laptop, locally, but sometimes I’ll work from another computer):

!

$ ssh -l remote_username example.com $ mkdir /path/to/wordpress/ $ cd /path/to/wordpress/ $ svn co http://svn.automattic.com/wordpress/trunk/ . $ nano filename.php

Page 12: Magical WordPress Development with Vagrant
Page 13: Magical WordPress Development with Vagrant

Minimum Requirements !

PHP 5.2.4 or greater MySQL 5.0 or greater The mod_rewrite Apache module !

Local LAMP Environments PHP, MySQL and Apache Binaries for Windows and Mac

!

Page 14: Magical WordPress Development with Vagrant

Minimum Requirements !

!

XAMPP, MAMP, WAMP !

Point and click stable LAMP sandboxes

!

Page 15: Magical WordPress Development with Vagrant

!

Environment Requirements

!

Ngnix Memcached Varnish Squid

Page 16: Magical WordPress Development with Vagrant

!

Environment Requirements

!

Ngnix Memcached Varnish Squid

Page 17: Magical WordPress Development with Vagrant

Vagrant is the magical

WordPress development environment you’ve been looking for

!

Page 18: Magical WordPress Development with Vagrant

What is Vagrant? Vagrant is open source software for creating and configuring portable development environments. !

http://www.vagrantup.com/about.html

Page 19: Magical WordPress Development with Vagrant

1. Host 2. Guest 3. Box 4. Provisioning

!

!

!

!

Anotomy of a Vagrant Virtual Machine

Page 20: Magical WordPress Development with Vagrant

.VagrantFile !

Page 21: Magical WordPress Development with Vagrant

provision.sh !

Page 22: Magical WordPress Development with Vagrant

Puppet Chef Salt

!

Page 23: Magical WordPress Development with Vagrant

$ vagrant up !

$ vagrant destroy

Page 24: Magical WordPress Development with Vagrant

Varying Vagrant Vagrants !

The primary goal of Varying Vagrant Vagrants (VVV) is to provide an approachable way for developers to begin working in a development environment that matches a production environment as closely as possible. !

“The gateway Vagrant Config” — Jeremy Felt !https://github.com/Varying-Vagrant-Vagrants/VVV

Page 25: Magical WordPress Development with Vagrant

VVV Site Wizard Bash script for spinning up new WordPress sites with VVV !

WordPress Theme Review VVV Creates a WordPress site set up with all the tools the Wordpress dot org theme review team uses. !

Primary Vagrant Uses Apache instead of Nginx and provisions with Puppet instead of bash

!

Page 26: Magical WordPress Development with Vagrant

13 Vagrant Resources for WordPress Development !

http://wptavern.com/13-vagrant-resources-for-wordpress-development !

!

!

Page 27: Magical WordPress Development with Vagrant

VIP Quick Start !

Closely resembles the WordPress dot com VIP stack !

!

!

Page 28: Magical WordPress Development with Vagrant

The Future? !

.VagrantFile in core !Hosting providers publishing a .VagrantFile !Hello WP Engine, HostGator, Media Temple !

!

!

Page 29: Magical WordPress Development with Vagrant

Questions? !

Comments? !

!

!