3. Director of
Web Development
at A2 Hosting
We spend a lot of time on making
WordPress better for our customers!
Ask me about Agile/Scrum!
Ask me about Pair Programming!
4. Caveat Emptor!
I am going to go through a lot of content
I will go through it FAST
There will be time for Q&A at the end
I will also be around the rest of the afternoon for 1-
on-1 questions
5. Goals of this talk:
(in no particular order)
Familiarize you with the different types of caching
and what they all do
Explain the benefits of caching
Look at some of the common plugins/tools used to
enable caching
Point you towards some tools to help you conduct
performance testing
6. 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) ?
7. 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/
8. 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
10. 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
11. 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
12. I shouldn’t have to say this, but…
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. Several Kinds of Caching Systems
Browser Cache
Page Cache
Object/Database Cache
Bytecode Cache
Content Delivery Network (CDN)
24. Browser Cache
A local cache utilized by modern web
browsers, saves assets from websites so it
doesn’t have to re-download them on
subsequent page views
27. Pros/Cons of Browser Caching
Browser cache relies on the client
Short-term solution
You have to configure WordPress to tell the
browser it CAN cache contents from your site
(we’ll get into that later)
28. Page Cache
Takes an entire compiled page and saves it as
a file, so it doesn’t have to get compiled again.
32. Pros/Cons of Page Caching
Usually file-system based (not stored in
memory) so still some overhead in disk I/O
Stores the ENTIRE page
Problematic for truly dynamic content
33. Object Cache / Database Cache
Stores the results of commonly-used queries
so the database doesn’t have to retrieve them
repeatedly
37. Pros/Cons of Database/Object Caching
DB access is high overhead, caching reduces
that overhead
Stores data out of the database
Also problematic for dynamic content
38. Bytecode Cache
Stores the compiled code (PHP) so the web
server doesn’t have to re-compile it at every
page load
Is typically stored in memory for faster access
39. <?php
print "This is some PHP.";
?>
01011010100100100100101010
10101010010101011101010100
10101010101010101010101010
<html><body>This is some
PHP.</body></html>
42. Pros/Cons of Bytecode Caching
Can be a little harder to enable
Especially if your host doesn’t support it
May require a VPS/cloud/dedicated server
Cache is stored in memory
(not disk) = FAST
43. Content Delivery Network (CDN)
CDN Sits between the server and the client,
and handles serving up some/all of your files
CDN’s typically have a large infrastructure of
multiple servers located in strategic
geographic locations
Can also provide security / attack mitigation
44. The orange arrows repeat for every:
• Image
• CSS File
• JavaScript File
• Video
• Etc.
48. Pros/Cons of CDN
Typically requires you to point your domain
DNS to the CDN service
Can be frustrating if you don’t have sync set
up between your website and the CDN
properly
Protects against DDoS and other attacks
52. Common Caching Plugins
WP Super Cache
Recommended by WordPress
Lots of features, not terrible to configure
W3 Total Cache (or variants like Fix W3TC)
Lots of features
Can configure any which way under the sun
WP Rocket
Commercial
“Set and forget” configuration
WP Fastest Cache
I don’t know much about this one but a lot of people like it
Many, MANY others. YMMV.
53. Common Caching Plugins
WP Super Cache WP Rocket W3 Total Cache WP Fastest
Cost Free $39/single site Free, Premium
$99/year
Free, Premium
$39.99/lifetime
Browser Caching NO YES YES YES
Gzip YES YES YES YES
Minification NO YES YES YES
Page Caching YES YES YES YES
Database
Caching
NO NO YES NO
OpCache NO YES YES NO
CDN Support YES YES YES YES
58. 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!