WordPress Site Speed WordPress Maui Meetup - October 15, 2015 Why - - PowerPoint PPT Presentation
WordPress Site Speed WordPress Maui Meetup - October 15, 2015 Why - - PowerPoint PPT Presentation
WordPress Site Speed WordPress Maui Meetup - October 15, 2015 Why Does Speed Matter? A ff ects Google ranking and page crawling since 2010 Akamai survey: 75% of the 1,058 people asked would not return to websites that took longer than 4
Why Does Speed Matter?
- Affects Google ranking and page crawling since 2010
- Akamai survey: 75% of the 1,058 people asked would
not return to websites that took longer than 4 seconds to load
- 64% of smartphone users expect pages to load in
less than 4 seconds
Back To School Traffic: 2014 vs. 2015
- 2014: 60% desktop, 33%
smartphone
- Smartphone average load
time: ~5.5 seconds
- 2015: 65% smartphone, 25%
desktop
- Smartphone average load
time: ~2.5 seconds
http://www.soasta.com/blog/back-to-school-website-performance-monitoring/
Let’s Say Your Blog Goes Viral.
- $9 / month server
- 5 million people in one week
- 9000 visitors at once
- How do you keep your website fast? (And up and
running?)
The Players In The Speed Game
- You. (Your web browser)
- Your server. (Web hosting)
- How does WordPress build a page from your theme, plugins,
content, and media?
- PHP code running on web server puts it all together
- Where does WordPress store page / post content and other data?
- Self-contained SQL database
What Happens When You Visit A WordPress Website?
- Your web browser requests page
- PHP code on server starts to build the HTML for your web page
- The server requests the data it needs from the WordPress
database
- Database runs query and returns result to server
- Server inserts the database data into the HTML of your web page
- Server sends the HTML back to your browser when the page is
ready.
- Your web browser begins to receive data from the server and load the
page
This entire process determines Time To First Byte or First Byte Time. Time To First Byte is the amount of time it takes your web browser to receive the very first byte of data back from your server.
Your Browser Takes Over…
- How many requests does your web browser make to load a single
page?
- Images, CSS, JavaScript, and many other files are loaded separately.
- Some files are required for the page to load in your browser. This is
called Time To First View - the amount of time it takes for the web page to load in your browser.
- Other files can be loaded after the page first loads. This is called
deferring or loading files asynchronously.
What Slows Down WordPress?
- Server has to build each page every time a browser requests it.
- Server has to read from the database every time the page
loads.
- Your server delivers images, CSS, JavaScript, and other files to
your browser every time a page loads.
- Your browser downloads images, CSS, JavaScript, and other
files every time a page loads.
What Is A Cache? And Why?
- A cache is any data that is stored in a location where it can be quickly
accessed.
- Why do we cache data?
- Stores work the server has already done, which reduces processor
- load. Your server doesn’t have to do the same job over and over again.
- Reduces the amount of information that needs to be sent over the
internet because cached data can be reused.
- Increases responsiveness of websites - and user experience!
What Is A CDN?
- CDN stands for Content Delivery Network - a super-fast
worldwide network of servers that delivers images, CSS, JavaScript, and other files to users based on their location.
- A CDN is a cache!
- CDNs reduce the load on your server. Visitors download files from
the CDN, not your server.
- CloudFlare is awesome. And free. And it protects your website
from attackers.
How Do We Speed Things Up?
- Server has to build each page every time a browser requests it.
- Server has to read from the database every time the page
loads.
- Your server delivers images, CSS, JavaScript, and other files to
your browser every time a page loads.
- Your browser downloads images, CSS, JavaScript, and other
files every time a page loads.
Page Cache Database / Object Cache CDN (Content Delivery Network) Browser Cache
WordPress Plugins
- W3 Total Cache
- Turn on Page Cache, Browser Cache, Database Cache, Object Cache.
- Turn on Minify if you’re not using CloudFlare. (CloudFlare does it
automatically.)
- If you are using CloudFlare, Go to Extensions -> Activate CloudFlare
and configure in General Settings.
- Good configuration guide: http://www.inspire2rise.com/w3-total-
cache-settings.html
Other Plugins For Speed
- WP Smush - Good image compressor
- Regenerate Thumbnails - Resizes images to theme
sizes
- Imsanity - Automatically scales down huge images
- P3 (Plugin Performance Profiler) - Measures which
plugins are dragging down performance
Great Sites
- webpagetest.org - My fave. Multiple tests at once.
Check out the waterfall.
- showslow.com - Great automatic monitoring and
compilation of stats.
- uptimerobot.com - Get notified if your site goes