SlideShare a Scribd company logo
16.12.2015 - Martin Wolfert - https://wp-loft.de
Speedup your WordPress with Nginx ANd HTTP/2
OR: How to get a performant WordPress installation without real caching plugins.
About …
kid of the german „Babyboomer-Generation"
lateral entrant in IT at 1-th of January 2000
means: 15 years of Linux- & WebHosting (LAMP) knowledge
since 1998, own profession in WebDesign & PHP-Programming
WordPress user since version 2.6
Panograf (360° photography)
main profession: Operations-Architekt, working for 1&1 Internet SE 

in Karlsruhe
Big fan of north-west france & and their coasts
Redwine & Scottish Single-Malt Whisky (from Islay) gourmet
HTTP/2 Evolution
HTTP/1.0 HTTP/1.1 SPDY HTTP/2
Source: 1)
Just to mention it
Latency is the Problem

Not bandwidth!
Except video-streaming
HTTP/1.x versus HTTP/2
Source: 2)
HTTP/1.1 uses many connections between client and server. As a modern browser could
handle only 4 - 8 parallel connections on a chosen target domain. So, loading of e.g. a WordPress
Page could be really painfull.
HTTP/2, The better Protocol
(Based on the actual HTTP/2 implementation from OPenSource-NGinx 1.9.7 *)
Single, Persistent Connection : Only one connection is used for each web page. The same
connection is used as long as the web page is open.

Multiplexing : Requests and replies are multiplexed onto separate streams within the single
connection. When the connection is stable, “head of line blocking” is eliminated.

Header Compression and Binary Encoding : Headers are compressed using a new, separate, 

secure standard -HPACK compression. It reduces the amount of data crossing the network.
Header information is sent in compact, binary format, not as plain text.

SSL Encryption - HTTP/2 allows you to add SSL support with, in some cases, no performance
penalty, making your site more secure.
* lacks of Server-Push and Prioritization
HTTP/2, Streaming
Three components (ascending):
Frames
Messages
Streams
Source: 3)
HTTP/2 Multiplexing
Source: 4)
Interleave multiple requests in parallel without blocking on any one
Interleave multiple responses in parallel without blocking on any one
Use a single connection to deliver multiple requests and responses in parallel
No old HTTP/1.1 stuff like e.g. image sprites or domain sharding
HTTP/2, Waterfall-diagramm
HTTP/2, Browser-Support
Source: 5)
This little „OR“ in the Subline
The „old“ stuff:

- Handling HTTP&HTTPS Port

- Nginx-Layer

- Varnish-Layer

- Apache-PHP-Layer
The „cool“ state-of-the-art stuff:

- only HTTPS (HTTP/2) Port

- Nginx-Layer

- HHVM / PHP-FPM - Layer

- Redis-Server
Really Without Cache Plugin?
Source: 6)
To get a bit more speed „on top“, i have a
Redis-Server running on my VPS. 



Redis is a key value store who can act as
„persistent object cache“ to store e.g. 

WordPress database queries.



So … we can start discussing, if Redis works
as a cache or not :). And we could also discuss, if the Redis Object Cache
Plugin, to bind WordPress to the Redis-Server, is a typical cache plugin or
not.
My Optimizations in addition
to HTTP/2
Source: 6)
HHVM instead of PHP-FPM (with Opcache)
Fast CGI Caching, based on Nginx
Google’s mod_pagespeed, based on Nginx
- CSS & JS - minify
- DNS Prefetch
- Async Google-Analytics
- Image deduplication
- etc.
GEOIP-blocking
Fail2ban based IP-blocking
A Resulting Speed Test

(Tested with webpagetest.org)
Source: 6)
Additional Informations
https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/
https://letsencrypt.org/
A bit self-promotion :-)



So, if you need a 360° Panorama-picture, visit my website on

http://panoramaatelier.de
For WordPress-Support and my WordPress-Blog look at
https://wp-loft.de
My personal Blog, you can find on

https://blog.lichttraeumer.de
THANK YOU !
Picture-Sources
1): „Human evolution scheme (2)“ von Human_evolution_scheme.svg: M. Gardederivative work: Gerbil (talk) -
Human_evolution_scheme.svg. Lizenziert unter CC BY-SA 3.0 über Wikimedia Commons - https://commons.wikimedia.org/wiki/
File:Human_evolution_scheme_(2).jpg#/media/File:Human_evolution_scheme_(2).jpg
2 & 3): https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf
4): http://chimera.labs.oreilly.com/books/1230000000545/ch12.html
5) http://caniuse.com/#feat=http2
6) http://www.asterix-comics.de/pics/gallisches-dorf.jpg

More Related Content

PDF
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
PDF
What HTTP/2.0 Will Do For You
PDF
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
PDF
HTTP2 is Here!
PDF
Open web mail setup
PDF
PDF
HTTP/2 standard for video streaming
PDF
Cowboy rabbit-websockets
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
What HTTP/2.0 Will Do For You
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
HTTP2 is Here!
Open web mail setup
HTTP/2 standard for video streaming
Cowboy rabbit-websockets

What's hot (19)

PPTX
Introduction to HTTP/2
PDF
Websocket 101 in Python
PPTX
Introduction to HTTP/2
PDF
maXbox starter46 work with Wine
PDF
HTTP2:新的机遇与挑战
PPTX
HTTP/2 Introduction
PDF
How WP Pipes changes the Wordpress world
PDF
HTTP 2.0 – What do I need to know?
PDF
Alex carcea, radu macovei a story of how java script joined the big league
PPTX
Introduction to xampp
PPT
Installation of wordpress
PDF
T3DD12 Caching with Varnish
 
PPT
Ruby Installation
 
PDF
Installation of LAMP Server with Ubuntu 14.10 Server Edition
PPT
KEY
Shiny New HTTP Shit
PPTX
HTTP at your local BigCo
PDF
Super performing websites with TYPO3 and Varnish
PPTX
Wp migration
Introduction to HTTP/2
Websocket 101 in Python
Introduction to HTTP/2
maXbox starter46 work with Wine
HTTP2:新的机遇与挑战
HTTP/2 Introduction
How WP Pipes changes the Wordpress world
HTTP 2.0 – What do I need to know?
Alex carcea, radu macovei a story of how java script joined the big league
Introduction to xampp
Installation of wordpress
T3DD12 Caching with Varnish
 
Ruby Installation
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Shiny New HTTP Shit
HTTP at your local BigCo
Super performing websites with TYPO3 and Varnish
Wp migration
Ad

Viewers also liked (17)

PDF
Monique Koepke / Typografie im Web
PDF
Einführung ins WP REST API
PDF
Ist deine Webseite wirklich Sicher?
PPTX
AutoScaling WordPress with Docker & AWS - WordPress Meetup Karlsruhe - Plesk
PPTX
WordPress Meetup Karlsruhe Plesk 2016 - Die Veränderung der Web Entwicklung -...
PDF
PoP - “Platform of Platforms”: Framework for building Single-Page Application...
PDF
Speedup your site mit Caching
PPTX
Computación
PPT
Macroeconomia
RTF
INTERRACIALITY
PPTX
Educación a distancia
PPS
PPS Online Presentation Pygmy Marmoset-Cindy Henry
PDF
Progress Monitoring Interpretation
PDF
Bảng hướng dẫn thành lập văn phòng công chứng
PDF
Academy_Portfolio_Zulfikar
PDF
Manual specialization
Monique Koepke / Typografie im Web
Einführung ins WP REST API
Ist deine Webseite wirklich Sicher?
AutoScaling WordPress with Docker & AWS - WordPress Meetup Karlsruhe - Plesk
WordPress Meetup Karlsruhe Plesk 2016 - Die Veränderung der Web Entwicklung -...
PoP - “Platform of Platforms”: Framework for building Single-Page Application...
Speedup your site mit Caching
Computación
Macroeconomia
INTERRACIALITY
Educación a distancia
PPS Online Presentation Pygmy Marmoset-Cindy Henry
Progress Monitoring Interpretation
Bảng hướng dẫn thành lập văn phòng công chứng
Academy_Portfolio_Zulfikar
Manual specialization
Ad

Similar to Speedup your WordPress mit Nginx und HTTP/2 (20)

PPTX
Introducing HTTP/2
PDF
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
PDF
HTTP/2: What's new?
PDF
The Case for HTTP/2 - EpicFEL Sept 2015
PPTX
HTTP/2 : why upgrading the web? - apidays Paris
PPT
5-WebServers.ppt
PPT
5-WebServers.ppt
PPTX
PPTX
HTML5, HTTP2, and You 1.1
PDF
HTTP cache @ PUG Rome 03-29-2011
PDF
HTTP colon slash slash: the end of the road?
PDF
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
PDF
Computer network (10)
ODP
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
PDF
Advanced Web Hosting
KEY
Push the web with HTML5
PDF
Surviving Slashdot
PPT
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
PPT
21 Www Web Services
PPTX
Apache web service
Introducing HTTP/2
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP/2: What's new?
The Case for HTTP/2 - EpicFEL Sept 2015
HTTP/2 : why upgrading the web? - apidays Paris
5-WebServers.ppt
5-WebServers.ppt
HTML5, HTTP2, and You 1.1
HTTP cache @ PUG Rome 03-29-2011
HTTP colon slash slash: the end of the road?
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
Computer network (10)
Как Web-акселератор акселерирует ваш сайт / Александр Крижановский (Tempesta ...
Advanced Web Hosting
Push the web with HTML5
Surviving Slashdot
High Performance Wordpress: “Faster, Cheaper, Easier : Pick Three”
21 Www Web Services
Apache web service

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Cloud computing and distributed systems.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks

Speedup your WordPress mit Nginx und HTTP/2

  • 1. 16.12.2015 - Martin Wolfert - https://wp-loft.de Speedup your WordPress with Nginx ANd HTTP/2 OR: How to get a performant WordPress installation without real caching plugins.
  • 2. About … kid of the german „Babyboomer-Generation" lateral entrant in IT at 1-th of January 2000 means: 15 years of Linux- & WebHosting (LAMP) knowledge since 1998, own profession in WebDesign & PHP-Programming WordPress user since version 2.6 Panograf (360° photography) main profession: Operations-Architekt, working for 1&1 Internet SE 
 in Karlsruhe Big fan of north-west france & and their coasts Redwine & Scottish Single-Malt Whisky (from Islay) gourmet
  • 3. HTTP/2 Evolution HTTP/1.0 HTTP/1.1 SPDY HTTP/2 Source: 1)
  • 4. Just to mention it Latency is the Problem Not bandwidth! Except video-streaming
  • 5. HTTP/1.x versus HTTP/2 Source: 2) HTTP/1.1 uses many connections between client and server. As a modern browser could handle only 4 - 8 parallel connections on a chosen target domain. So, loading of e.g. a WordPress Page could be really painfull.
  • 6. HTTP/2, The better Protocol
(Based on the actual HTTP/2 implementation from OPenSource-NGinx 1.9.7 *) Single, Persistent Connection : Only one connection is used for each web page. The same connection is used as long as the web page is open.
 Multiplexing : Requests and replies are multiplexed onto separate streams within the single connection. When the connection is stable, “head of line blocking” is eliminated.
 Header Compression and Binary Encoding : Headers are compressed using a new, separate, 
 secure standard -HPACK compression. It reduces the amount of data crossing the network. Header information is sent in compact, binary format, not as plain text.
 SSL Encryption - HTTP/2 allows you to add SSL support with, in some cases, no performance penalty, making your site more secure. * lacks of Server-Push and Prioritization
  • 7. HTTP/2, Streaming Three components (ascending): Frames Messages Streams Source: 3)
  • 8. HTTP/2 Multiplexing Source: 4) Interleave multiple requests in parallel without blocking on any one Interleave multiple responses in parallel without blocking on any one Use a single connection to deliver multiple requests and responses in parallel No old HTTP/1.1 stuff like e.g. image sprites or domain sharding
  • 11. This little „OR“ in the Subline The „old“ stuff:
 - Handling HTTP&HTTPS Port
 - Nginx-Layer
 - Varnish-Layer
 - Apache-PHP-Layer The „cool“ state-of-the-art stuff:
 - only HTTPS (HTTP/2) Port
 - Nginx-Layer
 - HHVM / PHP-FPM - Layer
 - Redis-Server
  • 12. Really Without Cache Plugin? Source: 6) To get a bit more speed „on top“, i have a Redis-Server running on my VPS. 
 
 Redis is a key value store who can act as „persistent object cache“ to store e.g. 
 WordPress database queries.
 
 So … we can start discussing, if Redis works as a cache or not :). And we could also discuss, if the Redis Object Cache Plugin, to bind WordPress to the Redis-Server, is a typical cache plugin or not.
  • 13. My Optimizations in addition to HTTP/2 Source: 6) HHVM instead of PHP-FPM (with Opcache) Fast CGI Caching, based on Nginx Google’s mod_pagespeed, based on Nginx - CSS & JS - minify - DNS Prefetch - Async Google-Analytics - Image deduplication - etc. GEOIP-blocking Fail2ban based IP-blocking
  • 14. A Resulting Speed Test
 (Tested with webpagetest.org) Source: 6)
  • 15. Additional Informations https://kinsta.com/blog/the-definitive-php-7-final-version-hhvm-benchmark/ https://letsencrypt.org/ A bit self-promotion :-)
 
 So, if you need a 360° Panorama-picture, visit my website on
 http://panoramaatelier.de For WordPress-Support and my WordPress-Blog look at https://wp-loft.de My personal Blog, you can find on
 https://blog.lichttraeumer.de
  • 17. Picture-Sources 1): „Human evolution scheme (2)“ von Human_evolution_scheme.svg: M. Gardederivative work: Gerbil (talk) - Human_evolution_scheme.svg. Lizenziert unter CC BY-SA 3.0 über Wikimedia Commons - https://commons.wikimedia.org/wiki/ File:Human_evolution_scheme_(2).jpg#/media/File:Human_evolution_scheme_(2).jpg 2 & 3): https://www.nginx.com/wp-content/uploads/2015/09/NGINX_HTTP2_White_Paper_v4.pdf 4): http://chimera.labs.oreilly.com/books/1230000000545/ch12.html 5) http://caniuse.com/#feat=http2 6) http://www.asterix-comics.de/pics/gallisches-dorf.jpg