Use W3 Total Cache to Speed Up Your WordPress Site
Speed is everything these days. People are browsing faster and have a shorter attention span. Time is literally money:
- Microsoft showed that when pages slowed by 1 second, ad clicks per user decreased by 1.5%.
- Amazon showed that when pages slowed by 1 tenth of a secon, sales decreased by 1%.
One great solution to make your WordPress sites run more quickly is the W3 Total Cache plugin. Here's how to use it:
Test Your Site
Before we speed up our site, let's test how fast it's running now. You can do that by visiting http://gtmetrix.com. In the image above I'm testing a plain WordPress install and it scored 87% and 93% on the two tests. Don't be surprised if your site is substantially slower after adding themes, plug-ins and widgets.
Video on Using the W3 Total Cache Plugin
Install W3 Total Cache
In the admin area of your WordPress site, search for, install and activate the W3 Total Cache Plugin. Once it's activated, you'll see a whole new Performance tab on the left-hand side:
Modify the W3 Total Cache Settings
Click on the the General Settings tab and you'll see that W3 Total Cache is only in Preview mode at the moment. To make it active on your site, click on either "deploy" or "disable". Clicking on any of those four links will make the plugin live for your visitors.
Once the plugin is live you'll see a small speed improvement, but the real benefits will come from enabling the extra settings. Here's what they do:
By default, WordPress will load all your images, plugins, themes and more for every visitor. Even if the visitor is seeing exactly the same page, WordPress has to do this work every time. Page Cache solves that problem by allowing WordPress to only create each page once every hour. The downside to that is that visitors won't see any new content added in that time. The upside is that WordPress will have to do much less work and will load faster.
Your site's code uses up a lot of extra space and that space takes time to load. This extra space is there for a good reason: just as with normal text, it's much easier to read code that is spaced out ratherthanallsquasheduptogether.
However, if you've made all the changes you want to the code, you can remove that space and allow your site to load more quickly. Turn on Minify and the extra space will be removed automatically.
Because there's a lot to this setting, I'd advise you to also click on the Minify tab on the left and enable the extra settings.
This has exactly the same concept as the Page Cache setting above but it's focused not on images and files, but on the information in your database such as content and comments.
Content Delivery Network
A Content Delivery Network or CDN will require more setup than anything else here - it will probably require you to sign up for an account at one of the CDN Types listed.
A CDN solves the problem of websites being hosted in one place. If your site is hosted in America, it will take much longer to load for people in Australia than for people actually in America. CDNs work by storing images and files from your website in locations all around the world. With a CDN someone in Australia might actually be able to download your images and files from a server in Australia.
The Browser Cache settings allow your site to take full advantage of the speed features offered by browsers. You can safely check all of these boxes.
What if You Want to Update Your Site
If you make any chances or updates to your site, remember that your site is being cached and the changes won't show instantly. If you do want to see them, clik the "empty all caches" button.
Test Your Site Again
Now go back to http://gtmetrix.com. Previously my site scored 87% and 93% on the two tests. Now it's all the way up to 96% and 98%. Hopefully your visitors and search engines will both notice and appreciate the improvement.