Your SlideShare is downloading. ×
0
Stop eating resources
and optimize your
WordPress site
Jeff Matson | @TheJeffMatson
InMotion Hosting | @inmotionhosting
Why do I need to optimize it?
Your host won’t hate your site
Resource hogs =
Lightweight and efficient =
Happy Sysadmin
HappyServer
Happy Developer
Your visitors don’t want to waste
their time with your slow site
● People are impatient. Give them what they
want immediat...
Stop spending money on resources
that you don’t need.
● Heavy sites mean more server load.
● More server load means bigger...
So how do I fix these problems?
Remove unnecessary garbage
● Do you really need that cool effect that
nobody actually cares about?
● That slider really do...
Give your images the shrink ray
● Compress your images as much as you
possibly can.
● Use the exact size image that you ar...
Minify all the things!
● Minify your CSS and JS.
● Combine your stylesheets and JS.
Caching, caching, caching
● Cache everything that you possibly can.
● Both server side and client side caching.
● Varnish ...
Block requests that don’t matter
● If they don’t impact your site positively, don’t
let them use your resources.
CDNs are a wonderful thing
● Let servers that are designed for serving
static content do the work for you.
● Your users wi...
Real-world example time!
Testing environment:
● Twenty Fourteen theme
● Default JetPack install
● 5 posts with large featured images
● 5 paragraphs...
Baseline Stats
● Server load begins
increasing almost
immediately.
● >5s page load time at
~17 active clients.
● 1.4 minut...
With basic disk caching enabled:
● >5s page load time at ~20 active clients.
● 1.3 minute load time at 50 active clients.
With basic caching and image
optimization
● Page load times rise
slightly slower than
with just caching
alone.
● 1.2 minut...
Disk caching and MaxCDN
● >5s page load time at ~30 active clients.
● 28.78 seconds load time at 50 active clients.
Basic disk caching on an SSD
● Page load times stayed at between 1.5
seconds and 2 seconds.
● Never increased above 2 seco...
Varnish caching and MaxCDN
● Page load time was always under 1 second.
● Most times, stayed 25ms.
● First errors came at 3...
Why did Varnish work so well?
The server was under a much lower load as it
was only serving static content once the cache
...
What have we learned?
● Varnish is your friend.
● If you can’t use Varnish, cache with W3
Total Cache and use a CDN.
● Eve...
Questions?
Jeff Matson | InMotion Hosting
@TheJeffMatson | @inmotionhosting
WordPress Performance Optimization - Jeff Matson - WordCamp Milwaukee 2014
Upcoming SlideShare
Loading in...5
×

WordPress Performance Optimization - Jeff Matson - WordCamp Milwaukee 2014

328

Published on

Jeff Matson's presentation at WordCamp Milwaukee on optimizing your WordPress site for the best speed possible.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
328
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress Performance Optimization - Jeff Matson - WordCamp Milwaukee 2014"

  1. 1. Stop eating resources and optimize your WordPress site Jeff Matson | @TheJeffMatson InMotion Hosting | @inmotionhosting
  2. 2. Why do I need to optimize it?
  3. 3. Your host won’t hate your site Resource hogs = Lightweight and efficient =
  4. 4. Happy Sysadmin HappyServer Happy Developer
  5. 5. Your visitors don’t want to waste their time with your slow site ● People are impatient. Give them what they want immediately. ● Not everyone has a fast internet connection. (shocking, I know)
  6. 6. Stop spending money on resources that you don’t need. ● Heavy sites mean more server load. ● More server load means bigger servers. ● Bigger servers mean more money. ● More money means a smaller wallet.
  7. 7. So how do I fix these problems?
  8. 8. Remove unnecessary garbage ● Do you really need that cool effect that nobody actually cares about? ● That slider really doesn’t need 64 slides in it. (really, this has happened to me) ● Stop calling 6 different versions of jQuery. Seriously, STOP!
  9. 9. Give your images the shrink ray ● Compress your images as much as you possibly can. ● Use the exact size image that you are displaying if possible. ● Use progressive JPEGs.
  10. 10. Minify all the things! ● Minify your CSS and JS. ● Combine your stylesheets and JS.
  11. 11. Caching, caching, caching ● Cache everything that you possibly can. ● Both server side and client side caching. ● Varnish is your friend. ● Browsers cache data for a reason. Tell them to keep static content.
  12. 12. Block requests that don’t matter ● If they don’t impact your site positively, don’t let them use your resources.
  13. 13. CDNs are a wonderful thing ● Let servers that are designed for serving static content do the work for you. ● Your users will get the static content faster while a weight is lifted from your server.
  14. 14. Real-world example time!
  15. 15. Testing environment: ● Twenty Fourteen theme ● Default JetPack install ● 5 posts with large featured images ● 5 paragraphs of text per post
  16. 16. Baseline Stats ● Server load begins increasing almost immediately. ● >5s page load time at ~17 active clients. ● 1.4 minute load time at 50 active clients.
  17. 17. With basic disk caching enabled: ● >5s page load time at ~20 active clients. ● 1.3 minute load time at 50 active clients.
  18. 18. With basic caching and image optimization ● Page load times rise slightly slower than with just caching alone. ● 1.2 minute load time at 50 active clients.
  19. 19. Disk caching and MaxCDN ● >5s page load time at ~30 active clients. ● 28.78 seconds load time at 50 active clients.
  20. 20. Basic disk caching on an SSD ● Page load times stayed at between 1.5 seconds and 2 seconds. ● Never increased above 2 seconds with 50 active visitors.
  21. 21. Varnish caching and MaxCDN ● Page load time was always under 1 second. ● Most times, stayed 25ms. ● First errors came at 322 hits/second.
  22. 22. Why did Varnish work so well? The server was under a much lower load as it was only serving static content once the cache for the page is built. Processing PHP takes server resources. Be nice to your server and give it less work to do.
  23. 23. What have we learned? ● Varnish is your friend. ● If you can’t use Varnish, cache with W3 Total Cache and use a CDN. ● Every little bit of extra processing will hurt your site.
  24. 24. Questions? Jeff Matson | InMotion Hosting @TheJeffMatson | @inmotionhosting
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×