Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

I'm Jason Cosper I work at WP Engine

Slide 3

Slide 3 text

I created Hipster Ipsum I organize the Bakersfield WordPress Meetup I maintain the Force Strong Passwords plugin

Slide 4

Slide 4 text

@boogah

Slide 5

Slide 5 text

When I gave this talk five months ago...

Slide 6

Slide 6 text

I was pushing HHVM Hard

Slide 7

Slide 7 text

The numbers were compelling WordPress 4.1.x with 20 concurrent users. • Requests per second • PHP 5.5: 256 • PHP 7: 627 • HHVM 3.7: 666 • Latency • PHP 5.5: 78 milliseconds • PHP 7: 32 milliseconds • HHVM 3.7: 30 milliseconds

Slide 8

Slide 8 text

PHP adoption rates were depressing • PHP 5.3 — 41.4% • Released: June 30, 2009 • End of Life: August 14, 2014 • PHP 5.4 — 30.1% • Released: March 1, 2012 • End of Life: September 12, 2015 • PHP 5.5 — 9.3% • Released: June 20, 2013 • End of Life: June 20, 2016 • PHP 5.6 — 1.5% • Released: August 28, 2014 • End of Life: August 28, 2017

Slide 9

Slide 9 text

And hosts were announcing HHVM support • WP Engine • DreamHost • Pagely • SiteGround • Kinsta • Etc.

Slide 10

Slide 10 text

Legacy PHP bad

Slide 11

Slide 11 text

But I was being myopic

Slide 12

Slide 12 text

Don't get me wrong HHVM is still fast

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

But PHP is PHP

Slide 15

Slide 15 text

PHP 7 is PHP on steroids

Slide 16

Slide 16 text

Let's take a look at some numbers boogah.org/55vs7

Slide 17

Slide 17 text

PHP 5.5 vs. PHP 7 • WordPress (4.3.1) • PHP 7 was 2.6 times faster than PHP 5.5 • WordPress (4.3.1) + WooCommerce (2.4.8) • PHP 7 was 1.4 times faster than PHP 5.5 • WordPress (4.3.1) + bbPress (2.5.8) • PHP 7 was 6.6 times faster than PHP 5.5 • WordPress (4.3.1) + BuddyPress (2.3.4) • PHP 7 was 4.7 times faster than PHP 5.5

Slide 18

Slide 18 text

All these numbers are pretty awesome

Slide 19

Slide 19 text

However, 67.9% of all PHP sites are currently powered by versions that should be considered dead

Slide 20

Slide 20 text

They have ceased to be

Slide 21

Slide 21 text

Why should anyone give a !?

Slide 22

Slide 22 text

Nobody builds sites for the past You build them for the future

Slide 23

Slide 23 text

The futch

Slide 24

Slide 24 text

vagrantup.com

Slide 25

Slide 25 text

Vagrant creates & configures virtual development environments

Slide 26

Slide 26 text

This means less yak shaving & more working

Slide 27

Slide 27 text

Varying Vagrant Vagrants is the industry standard for WordPress development

Slide 28

Slide 28 text

There is another

Slide 29

Slide 29 text

It does PHP 7 & HHVM And it was made for WordPress development

Slide 30

Slide 30 text

HGV github.com/wpengine/hgv

Slide 31

Slide 31 text

Built by WP Engine for our Mercury platform

Slide 32

Slide 32 text

No matter where you host your site, you can use HGV to test your code

Slide 33

Slide 33 text

HGV • Built with members of the 10up team • Work on your code under PHP 5.5, PHP 7 & HHVM at the same time • Provision multiple sites using YML files • Debugging & benchmarking tools • Xdebug • XHProf • Siege • query-monitor • debug-objects • debug-bar

Slide 34

Slide 34 text

Installing HGV is easyish

Slide 35

Slide 35 text

Prerequisites • Git • VirtualBox or VMware • Vagrant • The Vagrant Ghost plugin boogah.org/hgv-prereq ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install git brew install caskroom/cask/brew-cask brew cask install vagrant brew cask install virtualbox vagrant plugin install vagrant-ghost

Slide 36

Slide 36 text

Install cd ~ mkdir vagrant cd vagrant git clone --recursive https://github.com/wpengine/hgv.git cd hgv vagrant up

Slide 37

Slide 37 text

While HGV installs, make yourself a drink It should only take about 30 minutes

Slide 38

Slide 38 text

Get to work • Local file access • Use your favorite text editor! • [HGV_dir]/hgv_data/sites/[sitename]/ • [HGV_dir]/hgv_data/sites/[sitename]/wp-content/[plugins|themes]/ • SSH • vagrant ssh • phpMyAdmin • admin.hgv.test/phpmyadmin/

Slide 39

Slide 39 text

Just import your site and see what breaks

Slide 40

Slide 40 text

PHP 7 & WordPress boogah.org/php7wp

Slide 41

Slide 41 text

Switching your environment is a piece of cake

Slide 42

Slide 42 text

Force your site to PHP 7 vagrant ssh sudo nano -w /etc/nginx/conf.d/www-[sitename].conf

Slide 43

Slide 43 text

Force your site to PHP 7 Change this: cache.php.example.test php; php.example.test php; To this: cache.php.example.test php7; php.example.test php7; Save your changes!

Slide 44

Slide 44 text

Force your site to PHP 7 service nginx restart

Slide 45

Slide 45 text

Questions?