Things change rapidly in the WordPress world. The content in this post is more than a year old and may no longer represent best practices.
Mattt Kopala, founder of SiteDistrict, explains the factors that affect website page loading time, and how to find out when the problem is your hosting, not your WordPress installation.
Slides: Stop Guessing: Diagnosing & Fixing WordPress Server-side Performance
Why does speed matter? Speed == Happiness
If you’re a WordPress developer, you’ve inevitably had to deal with a slow site. And quite apart the negative effects poor performance has on Google rankings and conversion, no one ever said they wanted their website to be slower.
Why don’t more developers and site owners speed up their sites?
Sometimes it’s because they can’t be bothered, but it’s more often because they don’t know how. Trying to improve site performance can involve high effort for low payoff.
Steps in loading a web page
- Server Response
- Asset Downloads (JS, CSS, images, fonts)
Everything before “parsing” is related to something besides the site itself.
When does caching fail?
First, if you’re on regular hosting that isn’t optimized for WordPress, object caching probably isn’t even turned on. And then there are parts of a site that are usually either not cached, or shouldn’t be cached, such as
- The WP Admin
- Front-end pages for logged-in users
- Pages with a LOT of sites: takes a long time to load the cache
- Pages with dynamic customized content
Site speed testing tools
On most slow sites, the time to first byte is the thing that causes the slowdown. You want your TTFB under 500ms (1/2 second). Total page load should be under 2 seconds if possible.
Sometimes hosting is a silver bullet, but not always. How do you know whether your host is (part of) the issue? It’s not an easy thing to verify reliably…while it’s on your current host.
To find out whether your hosting is (part of) the problem, move an identical copy of the site to a different host. If you notice an immediate and dramatic performance improvement, you need better hosting.
How Not to Guess
- Generate Traffic
- Review Profiling Data
- Change Things
You can use New Relic’s advanced speed testing tools on SiteDistrict for free. Import the site, run the tests, take a look at the results. This gives you something concrete to show your client when persuading them to change hosting.
Note that New Relic itself causes a substantial performance impact, so turn it off except when you are running tests.
The rest of the presentation was taken up by a demo, importing a real site and examining its performance issues, including checking to see which plugins are causing issues and what’s slowing down the WordPress admin. (Jetpack and Yoast are both big offenders; the Constant Contact plugin, which syncs contacts with CC, was also a major factor.)
Matt has now updated his slides to include screenshots from the demonstration of SiteDistricts speed testing and analysis tools:
- Setting up a speed test
- Histograms of speed tests of both the live site (on the client’s old host) and the dev site (on SiteDistrict)
- What the speed test shows when certain plugins are disabled
- What’s slowing down WP admin?
- In addition to the histogram, you can see the load time for each URL crawled
- The pretty customized graphs that SiteDistrict produces to show you what’s affecting your performance