SlideShare a Scribd company logo
CACHING 101
(and a little dose of optimization)
PRESENTED TO DETROIT METRO WORDPRESS MEETUP
BY ANDY MELICHAR
Director of Web
Development and
Agile Product Owner
for A2 Hosting
We spend a lot of time on making
WordPress better for our customers!
Ask me about Agile/Scrum!
From the Perspective of a Hosting
Company…
 A high percentage of our current and new customers are
WordPress users, and the number keeps rising
 Being on the hosting end, we can dig into common
performance issues MUCH deeper because we know our web
servers inside and out
 The very high percentage of WordPress related support
requests that we receive are performance related, so we’ve
looked at many different ways to improve performance
How many of you…
 Have attempted to optimize your WP Site?
 Have installed/configured a caching plugin?
 Know what a CDN is?
 Have added configurations to an .htaccess file
 Are running your own server (VPS/dedicated/cloud) ?
What the heck is caching, anyway?
Cache [kash]
noun
Computers. a temporary storage space or memory that allows fast
access to data: Web browser cache; CPU cache.
Several Kinds of Caching Systems
Page Cache
Asset Cache
Object Cache
Bytecode Cache
Page Cache
 Takes an entire rendered page and saves it as
a file, so it doesn’t have to get rendered again.
Asset Cache
 Stores files associated with a page, such as
images, javascript, CSS
 Typically happens on the client side, or
through use of a CDN (Content Delivery
Network)
Object Cache / Database Cache
 Stores the results of commonly-used queries
so the database doesn’t have to retrieve them
repeatedly
Bytecode Cache
 Stores the compiled code (PHP) so the the
web server doesn’t have to re-compile it at
every page load
How do I get caching on my site?
Install a Plugin!
That’s all fine and dandy, what does
that have to do with WordPress?
(AND WHY SHOULD I CARE?)
Some statistics…
 40% of people abandon a website that takes more
than 3 seconds to load
 A 1 second delay in page response can result in a 7%
reduction in conversions
 If an e-commerce site is making $100,000 per day, a
1 second page delay could potentially cost you $2.5
million in lost sales every year
Source: https://blog.kissmetrics.com/loading-time/
Bottom line…
 A poorly optimized website can cost you real $$ in
support and hosting costs
 By diving into performance and optimization, you’ll
learn more about WordPress, and more about web
systems and infrastructure
 Caching is one of the quickest, easiest ways you can
improve the performance of your WordPress site
How do you measure performance?
Performance Measurement Tools
 Gtmetrix.com – my favorite!
 Free
 Easy to use/understand
 Has a WordPress Plugin
 WebPageTest.org
 Also Free
 Lots of great detailed information
 LoadImpact.com
 Free + Paid plans
 Simulates multiple, concurrent users hitting your site
What Measurements Matter?
 Page Load Time
 Most representative of the customer experience
 Best “overall” performance metric
 Total Page Size
 Good to keep an eye on this for major problems such
as
Uncompressed images
High-resource themes/plugins
The Target: ke0ata.com
 On a VPS server with several other sites, all fairly low traffic
 Running nginx web server
 Faster than Apache
 Latest WordPress
Let’s Look at our Before
(Without Caching)
First of all…
 Clean house!
Get rid of unused themes/plugins/etc.
Don’t just deactivate… DELETE
Be sure everything is up-to-date
Most recent WordPress version
Plugins are all updated to latest version
Optimizations within WordPress
 Utilize a Caching Plugin
W3 Total Cache or Fix-W3TC
Free and HIGHLY configurable
WP Rocket
Paid, but comes well-recommended
WP Super Cache
Robust and easy to use
The Client/Server Process
WITHOUT Page Caching
The orange arrows repeat for every:
• Image
• CSS File
• JavaScript File
• Video
• Etc.
The Client/Server Process
WITH Page Caching
With Caching, we skip a bunch of steps!
• File System
• PHP
• Database
Enable Caching – Results (Gtmetrix)
Before Caching
After Caching
25 Concurrent Virtual Users
Using LoadImpact.com
No Caching: 1.5s Page Load Time Caching: 180ms Page Load Time
Optimizations within WordPress
 Turn on Minification
 Most caching plugins will have an option for this, but it
may not be enabled by default
 You DO have to be careful, because Minification can
break some themes/plugins, YMMV
Minification – JQuery Before / After
Before
10,220 Lines
261KB File Size
After
3 (LONG) Lines
85KB File Size
~60%
Reduction
In size
Optimizations within WordPress
 Turn on GZip Compression
 Vast majority of hosts (especially shared hosts) support
GZip from the server level, it just needs to be enabled
 Easily enabled via .htaccess rules
 Most caching plugins will also have an option to
enable GZip compression
https://codex.wordpress.org/Output_Compression
Enable GZip – Results (Gtmetrix)
Before Gzip
After Gzip
Server-Side Optimizations for
WordPress
 Add “Expires” headers for static content
 This tells the user’s browser to cache static files locally
so they don’t have to transferred repeatedly
 Done in either .htaccess or nginx config
 Plugins like W3 Total Cache can help you do this,
though you may still need to edit an .htaccess or nginx
config file
Server-Side Optimizations for
WordPress
 Enable APC/OpCache
 APC (for PHP < 5.5) or OpCache (for PHP 5.5 and greater)
reduces the amount of time it takes the server to process
PHP files
 Few shared hosts have this enabled on their servers
 Typically need to have a VPS or Dedicated server with APC
or OpCache Installed
 Once enabled on the server, nothing to configure or turn
on in WordPress
The Results!
What’s up with that ‘C’ ?
What’s up with that ‘C’ ?
 If we wanted to further optimize, we could
bring these JS/CSS files local so they would
get Minified/GZipped
Look a little closer at our “After”
 On a repeat view we are REALLY flying
 Only 1 request needed
 Under 1s load time
 Bytes in: 16KB!
Final Thoughts
 There are LOTS of options to optimize/gain
performance
 You don’t have to do them all
 Many people in the WordPress community
know how to help you with these
configurations
 The Codex is your friend!
Questions?

More Related Content

What's hot

High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
Barry Abrahamson
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007Barry Abrahamson
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
Joomla!Days Netherlands
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
Andy Melichar
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
Barry Abrahamson
 
Ship WordPress Projects Like a Boss
Ship WordPress Projects Like a BossShip WordPress Projects Like a Boss
Ship WordPress Projects Like a Boss
SiteGround.com
 
WordPress Migrations 101 - WordCamp Orlando
WordPress Migrations 101 - WordCamp OrlandoWordPress Migrations 101 - WordCamp Orlando
WordPress Migrations 101 - WordCamp Orlando
SiteGround.com
 
Leeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website SpeedLeeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website Speed
Arlen Nagata
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
Anam Ahmed
 
Speed kills
Speed killsSpeed kills
Speed kills
Josh Ward
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
Alan Lok
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009
joetek
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
Nile Flores
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
Mark Kelnar
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
 
Ui perf
Ui perfUi perf
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
Jonathan Hochman
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
Johannes Siipola
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcache
valuebound
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...
Thomas Audunhus
 

What's hot (20)

High Performance WordPress
High Performance WordPressHigh Performance WordPress
High Performance WordPress
 
ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007ServerBeach and WordPress BlogWorldExpo 2007
ServerBeach and WordPress BlogWorldExpo 2007
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
High Performance WordPress II
High Performance WordPress IIHigh Performance WordPress II
High Performance WordPress II
 
Ship WordPress Projects Like a Boss
Ship WordPress Projects Like a BossShip WordPress Projects Like a Boss
Ship WordPress Projects Like a Boss
 
WordPress Migrations 101 - WordCamp Orlando
WordPress Migrations 101 - WordCamp OrlandoWordPress Migrations 101 - WordCamp Orlando
WordPress Migrations 101 - WordCamp Orlando
 
Leeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website SpeedLeeward WordPress Meetup- Caching and Website Speed
Leeward WordPress Meetup- Caching and Website Speed
 
WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019WordPress At Scale. WordCamp Dhaka 2019
WordPress At Scale. WordCamp Dhaka 2019
 
Speed kills
Speed killsSpeed kills
Speed kills
 
Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015Speeding up your WordPress Site - WordCamp Toronto 2015
Speeding up your WordPress Site - WordCamp Toronto 2015
 
Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009
 
Introduction to WordPress Security
Introduction to WordPress SecurityIntroduction to WordPress Security
Introduction to WordPress Security
 
Optimizing wp
Optimizing wpOptimizing wp
Optimizing wp
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Ui perf
Ui perfUi perf
Ui perf
 
Breaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites WinBreaking the Speed Limit: Faster Websites Win
Breaking the Speed Limit: Faster Websites Win
 
Building faster websites: web performance with WordPress
Building faster websites: web performance with WordPressBuilding faster websites: web performance with WordPress
Building faster websites: web performance with WordPress
 
How to reduce database load using Memcache
How to reduce database load using MemcacheHow to reduce database load using Memcache
How to reduce database load using Memcache
 
Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...Cache is keeping you from reaching the full potential as a developer (word ca...
Cache is keeping you from reaching the full potential as a developer (word ca...
 

Similar to Caching 101

Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
SiteGround.com
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
Chris Olbekson
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website Speed
Nile Flores
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
Andy Kucharski
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbsvarien
 
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
WordCamp Harare
 
WordCamp Harare 2016 - Site Speed = Success
WordCamp Harare 2016 - Site Speed = SuccessWordCamp Harare 2016 - Site Speed = Success
WordCamp Harare 2016 - Site Speed = Success
Anthony Somerset
 
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
Speed Up WordPress Websites - Part 1 - WordPress Cairo MeetupSpeed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
Ahmed Mohammed Nagdy
 
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
persuebusiness
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
David Parsons
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster WebsiteRayed Alrashed
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
Chris Finne
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
Rasbor.com
 
Tips to improve your website performance
Tips to improve your website performanceTips to improve your website performance
Tips to improve your website performance
WebGuru Infosystems Pvt. Ltd.
 
Website Performance
Website PerformanceWebsite Performance
Website PerformanceHugo Fonseca
 
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
I-Verve Inc
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPress
Josh Highland Giese
 
Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanaceMichelle Castillo
 

Similar to Caching 101 (20)

Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
Introduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website SpeedIntroduction to Optimizing WordPress for Website Speed
Introduction to Optimizing WordPress for Website Speed
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
 
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
 
WordCamp Harare 2016 - Site Speed = Success
WordCamp Harare 2016 - Site Speed = SuccessWordCamp Harare 2016 - Site Speed = Success
WordCamp Harare 2016 - Site Speed = Success
 
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
Speed Up WordPress Websites - Part 1 - WordPress Cairo MeetupSpeed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
 
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdfGuide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
Guide 4 - How To Dramatically Speed Up Your Website Using A Caching Plugin.pdf
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
Scaling 101 test
Scaling 101 testScaling 101 test
Scaling 101 test
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
 
Tips to improve your website performance
Tips to improve your website performanceTips to improve your website performance
Tips to improve your website performance
 
Website Performance
Website PerformanceWebsite Performance
Website Performance
 
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
How to Improve Magento Performance | Tips to Speed up Magento eCommerce Site/...
 
Optimizing the performance of WordPress
Optimizing the performance of WordPressOptimizing the performance of WordPress
Optimizing the performance of WordPress
 
Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanace
 

Recently uploaded

BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 

Recently uploaded (20)

BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 

Caching 101

  • 1. CACHING 101 (and a little dose of optimization) PRESENTED TO DETROIT METRO WORDPRESS MEETUP BY ANDY MELICHAR
  • 2. Director of Web Development and Agile Product Owner for A2 Hosting We spend a lot of time on making WordPress better for our customers! Ask me about Agile/Scrum!
  • 3. From the Perspective of a Hosting Company…  A high percentage of our current and new customers are WordPress users, and the number keeps rising  Being on the hosting end, we can dig into common performance issues MUCH deeper because we know our web servers inside and out  The very high percentage of WordPress related support requests that we receive are performance related, so we’ve looked at many different ways to improve performance
  • 4. How many of you…  Have attempted to optimize your WP Site?  Have installed/configured a caching plugin?  Know what a CDN is?  Have added configurations to an .htaccess file  Are running your own server (VPS/dedicated/cloud) ?
  • 5. What the heck is caching, anyway?
  • 6. Cache [kash] noun Computers. a temporary storage space or memory that allows fast access to data: Web browser cache; CPU cache.
  • 7. Several Kinds of Caching Systems Page Cache Asset Cache Object Cache Bytecode Cache
  • 8. Page Cache  Takes an entire rendered page and saves it as a file, so it doesn’t have to get rendered again.
  • 9. Asset Cache  Stores files associated with a page, such as images, javascript, CSS  Typically happens on the client side, or through use of a CDN (Content Delivery Network)
  • 10. Object Cache / Database Cache  Stores the results of commonly-used queries so the database doesn’t have to retrieve them repeatedly
  • 11. Bytecode Cache  Stores the compiled code (PHP) so the the web server doesn’t have to re-compile it at every page load
  • 12. How do I get caching on my site?
  • 14. That’s all fine and dandy, what does that have to do with WordPress? (AND WHY SHOULD I CARE?)
  • 15. Some statistics…  40% of people abandon a website that takes more than 3 seconds to load  A 1 second delay in page response can result in a 7% reduction in conversions  If an e-commerce site is making $100,000 per day, a 1 second page delay could potentially cost you $2.5 million in lost sales every year Source: https://blog.kissmetrics.com/loading-time/
  • 16. Bottom line…  A poorly optimized website can cost you real $$ in support and hosting costs  By diving into performance and optimization, you’ll learn more about WordPress, and more about web systems and infrastructure  Caching is one of the quickest, easiest ways you can improve the performance of your WordPress site
  • 17. How do you measure performance?
  • 18. Performance Measurement Tools  Gtmetrix.com – my favorite!  Free  Easy to use/understand  Has a WordPress Plugin  WebPageTest.org  Also Free  Lots of great detailed information  LoadImpact.com  Free + Paid plans  Simulates multiple, concurrent users hitting your site
  • 19. What Measurements Matter?  Page Load Time  Most representative of the customer experience  Best “overall” performance metric  Total Page Size  Good to keep an eye on this for major problems such as Uncompressed images High-resource themes/plugins
  • 20. The Target: ke0ata.com  On a VPS server with several other sites, all fairly low traffic  Running nginx web server  Faster than Apache  Latest WordPress
  • 21. Let’s Look at our Before (Without Caching)
  • 22. First of all…  Clean house! Get rid of unused themes/plugins/etc. Don’t just deactivate… DELETE Be sure everything is up-to-date Most recent WordPress version Plugins are all updated to latest version
  • 23. Optimizations within WordPress  Utilize a Caching Plugin W3 Total Cache or Fix-W3TC Free and HIGHLY configurable WP Rocket Paid, but comes well-recommended WP Super Cache Robust and easy to use
  • 25. The orange arrows repeat for every: • Image • CSS File • JavaScript File • Video • Etc.
  • 27. With Caching, we skip a bunch of steps! • File System • PHP • Database
  • 28. Enable Caching – Results (Gtmetrix) Before Caching After Caching
  • 29. 25 Concurrent Virtual Users Using LoadImpact.com No Caching: 1.5s Page Load Time Caching: 180ms Page Load Time
  • 30. Optimizations within WordPress  Turn on Minification  Most caching plugins will have an option for this, but it may not be enabled by default  You DO have to be careful, because Minification can break some themes/plugins, YMMV
  • 31. Minification – JQuery Before / After Before 10,220 Lines 261KB File Size After 3 (LONG) Lines 85KB File Size ~60% Reduction In size
  • 32. Optimizations within WordPress  Turn on GZip Compression  Vast majority of hosts (especially shared hosts) support GZip from the server level, it just needs to be enabled  Easily enabled via .htaccess rules  Most caching plugins will also have an option to enable GZip compression https://codex.wordpress.org/Output_Compression
  • 33. Enable GZip – Results (Gtmetrix) Before Gzip After Gzip
  • 34. Server-Side Optimizations for WordPress  Add “Expires” headers for static content  This tells the user’s browser to cache static files locally so they don’t have to transferred repeatedly  Done in either .htaccess or nginx config  Plugins like W3 Total Cache can help you do this, though you may still need to edit an .htaccess or nginx config file
  • 35. Server-Side Optimizations for WordPress  Enable APC/OpCache  APC (for PHP < 5.5) or OpCache (for PHP 5.5 and greater) reduces the amount of time it takes the server to process PHP files  Few shared hosts have this enabled on their servers  Typically need to have a VPS or Dedicated server with APC or OpCache Installed  Once enabled on the server, nothing to configure or turn on in WordPress
  • 37. What’s up with that ‘C’ ?
  • 38. What’s up with that ‘C’ ?  If we wanted to further optimize, we could bring these JS/CSS files local so they would get Minified/GZipped
  • 39. Look a little closer at our “After”  On a repeat view we are REALLY flying  Only 1 request needed  Under 1s load time  Bytes in: 16KB!
  • 40. Final Thoughts  There are LOTS of options to optimize/gain performance  You don’t have to do them all  Many people in the WordPress community know how to help you with these configurations  The Codex is your friend!

Editor's Notes

  1. One of the nice things about working for a hosting company is that I, and my colleagues, get to know WordPress really well.
  2. In order to fully understand the impact of caching, we first need to understand HOW we measure performance on our website.
  3. (talk through each step)
  4. Talk through each step and explain how it is a much shorter process.
  5. On the GTMetrix we can see a direct result in our page load time. It’s not huge, but my website also isn’t very complex, so it’s harder for us to see enormous improvements. The other thing to remember about caching, is that when it REALLY shines, is with concurrent website traffic. Let’s take a look!
  6. Here’s where we really see the difference – this test was conducted with LoadImpact sending 25 users to my site over 5 minutes.
  7. Jquery is a fairly common javascript library used in many frameworks and themes. If you compare the the full, development-ready version of Jquery against the same version run through minification, you can see the difference in size.
  8. Here’s a before and after, you can see the direct results in both our PageSpeed and Yslow scores, but also the Total Page Size is reduced by about a third.
  9. Where we really see a benefit is in the repeat view…