August 31, 2012
WordPress makes setting up your own website super easy. What it doesn’t do automatically, however, is set up your site to perform the best it possibly can.
What do I mean by “perform” in this case? Load time, load time, load time. How fast does the site load for first time visitors? How fast does the site load for subsequent visits?
You might be asking why site performance is a big deal. “Doesn’t everyone have broadband these days? Isn’t my site’s performance just based on what server it’s running on? Is there anything I can really do to improve it?”
First off, yes, website performance is a big deal. Kiss Metrics has a great article that covers data from Akamai and Gomez. The gist is that the longer your site takes to load, the more potential visitors will abandon their session and go somewhere else. While a lot of people do have broadband, it’s not as widespread as some people think. Plus, with the explosion of smart phones in recent years, you also have to consider loading speeds for mobile users.
While the server itself does have an influence on site loading speed, particularly if you’re loading complex pages that pull data from multiple sections of your CMS, there are many things you can do that take a load off the server to make its job even easier. Yes, there is plenty you can do to improve your site’s performance and much of it is very easy.
A Few Tips
To know how your site is performing, you first need to use a tool to measure it. First off, if you’re using Google Analytics you can get Page Speed Reports for your site. For a more proactive scan, however, there are multiple options that not only tell you how long pages take to load, but also give pointers on what to do to improve loading speed. Depending on what web browser you use, there’s probably a plugin that integrates either Google Page Speed Insights, YSlow, or Pingdom Full Page Test. All three options provide similar results, though as a Chrome user, I tend to use Page Speed Insights most frequently because it integrates nicely with the developer tools in the browser.
Let’s take a look a simple WordPress site I set up for this post. TestBed gets an initial PageSpeed Score of 68 (out of 100). This translates into a Pingdom Tools initial loading time of 696ms. It’s not surprising that with very little content, we have no high priority issues, but there’s still room to improve. If we set up our WordPress installation properly now, it will stay fast as the site grows.
The easiest way to take our WordPress site from a 68/100 to a 90+/100 score is to utilize a plugin like W3 Total Cache. This incredible, full-featured plugin includes options to help tweak all sorts of performance and cache settings. Best of all, you can get many of its benefits just by checking a few boxes in the WordPress backend.
Breaking it Down
Once you install and activate the plugin, you’ll have a new left menu items labeled “Performance”. The initial “General Settings” page will give you quick toggles for page caching, minification, database caching, object caching, browser caching and content delivery network use. While you can (and should) play with each of these individually to get to know exactly what they do for your site, I’m going to turn on all but the CDN and just see what happens.
Once I check the boxes on the “General Settings” page next to each option that I want to enable (and save), there are a couple more steps. First let’s go in to the “Minify” page. On this page I’m going to scroll down to the HTML & XML section and enable it. I’ll also cehck both “Inline” options so that any CSS or JS that’s actually on my pages, (as opposed to being in separate files), is also minified. We can now save those settings and move on to the “Browser Cache” page. On this page, we just want to make sure that “set expires header”, “set cache control header” and “set entity tag” are all enabled. Save those settings and we’re done with our quick and simple optimization.
As you can see, our experiment couldn’t have gone better. We’ve jumped from 68/100 up to a perfect 100/100 and a 294ms load time with just a few minutes of work. In a more realistic environment, we probably wouldn’t see such crazy results, as this is indicative of the best case scenario. You shouldn’t be surprised, however, to see your site’s scores jump into the low 90s with just these simple tweaks. You can then take it into the mid to high 90s with a little more understanding of both the scan results and what W3 Total Cache lets you do.
In a later post I’ll try to explore the Content Delivery Network options of W3 Total Cache to show you how off-loading the larger files of your site to Amazon Web Services or similar cloud options can improve your site performance even more.
Do you have a site that you don’t feel is performing as well as it should? Do you have a site that’s not in WordPress that you’d like to migrate over so that you can take advantage of both the benefits of a CMS and simple performance options like I’ve described?