Stop Guessing: Diagnosing and Fixing WordPress Performance
Presentation by Matt Kopala at WordCamp LA 2018
Matt Kopala (@mkopala) | Twitter
Speed matters. People are impatient. If your website or a client’s website doesn’t load quickly – within a just a couple of seconds – many visitors will abandon it completely. A slow site means lost time & revenue. But figuring out how to speed up a slow site can be HARD.
Everyone’s got a suggestion and an idea for how to fix your performance issues. Disable this plugin, try this, try that … usually just guesses, and not based on real data.
STOP GUESSING. If you have a performance issue, or just want to make your site faster, you need to KNOW exactly what is going on with your actual, live site in production.
We’ll start by with an overview of WordPress page performance, and then focus on server response times, and what affects them. We’ll take a look at tools that will tell you exactly what plugins are slowing down your site.
Why performance matters
- wastes time if wp admin is slow
- Google ranking
- visitor perception
- speed = happiness
- Why don’t developers fix their slow site
- Optimization can be risky and uncertain
- priority = value / effort
Caching
- Is caching the solution?
- A good object caching plugin can help across pages
- Page caching failures
- Doesn’t work on wp admin
- Large sites with too many pages
- Caches expire, get cleared
- Caching is great, but is only part of solution
Measuring site performance
- Anatomy of a page load
- TTFB - Time to first byte
- DNS
- https
- Server response
- WordPress php and sql queries
- Parsing
- Asset download js, css, images, fonts
- Rendering
- TTFB - Time to first byte
- How fast time to first byte TTFB
- Very fast 50-150 ms
- Fast 150-300 ms
- Good 300-500 ms
- Very slow 1.5 sec
Diagnosing server response time (TTFB)
- Page performance - Chrome Web Store
- Chrome developer tools
- WebPagetest - Website Performance and Optimization Test
- TTFB
- Load time
- Film strip view shows over time how page looks as its loaded
- GTmetrix | Website Speed and Performance Optimization
- Not recommended. I like stat for total page size. Is it accurate?
- SiteDistrict
- Recommended WordPress hosts
- Kinsta
- Pantheon
- Flywheel
- Nginx is faster than Apache
- New Relic
- How to know what is causing the bottleneck php + mysql?
- Application performance monitoring tool APM
- Free trial for pro version
- Profiles offer lots of good performance info
- Time broken down by php + database
- Response time by plugin and hooks.
- Slide deck shows examples for JetPack, Wordfence, Beaver Builder
- How to test wp admin?
- Site district does test for wp admin
- Sometimes what makes front end slow is different from back end
- Yoast SEO can run slowly on backend
- Considerations
- not number of plugin, but what they are doing
- theme can also be a major part of your performance problem
- test early and often
Page Load Speed
- Start with webpage test
- Image optimization
- check score for compressed images
- how much of page content is image data
- check for large png files that could be jpg
- often can compress more even if you have an A
- Analyse waterfall
- Defer images, CSS and JavaScript
Summary
- Measure your performance first
- Good host
- If TTFB is slow, profile with new relic
- Image optimization
Links
- Chrome DevTools | Tools for Web Developers
- Lighthouse
- Performance - Firefox Developer Tools | MDN
- Troubleshooting WordPress Performance with New Relic
- How to Find WordPress Performance Bottlenecks with New Relic
- https://wpengine.com/wp-content/uploads/2017/08/WPE-WP-PerformanceMonitoringWithNewRelicAPM_v01-1.pdf
- SiteDistrict