Page speed is an incredibly important factor to consider for your website. It can be instrumental towards delivering a good user experience to your website's visitors and also has an effect on your search engine rankings, as Google have officially stated.
I've been doing a lot of research recently into the best was to improve your website load speeds, specifically for WordPress sites. What I have came up with is some quick pointers on how to measure, improve and sustain quality load times. So here goes...
Measurement and Analysis
Your first port of call is to establish the current situation of your website. There's a number of ways that you can do this really quickly and easily, for free.
GTmetrix is a fantastic free tool that you can use to measure the page speed of any of your URLs and the load time of your site. The above screenshot shows the Find My Blog Way site before I did any work on improving the load times. One great feature is that it shows you the number of requests made by your site along with the total page site - both of which I want to reduce.
Google Page Speed Plugin
This is a really handy feature from Google that you can use as a plugin for Chrome to find out the page speed score of any given URL, as well as some improvement recommendations. It gives some quick, actionable advice that you can use to identify initial problems (or areas for improvement) on your site.
Reducing Page Load Times
Minify, Minify, Minify...
Thankfully, a little plugin called 'WP Minify' can do all this hard work for us so that you don't need to manually nit-pick through all of your code yourself. What's more is that the plugin is free - great! Simply install the plugin to your WordPress website and then let it do its magic - simple.
Setting Maximum Images Sizes in WordPress
One quick way to ensure that you're not creating unnecessarily large images on your website (that will take longer to load) is by setting the maximum image size within WordPress.
Actually doing this within WordPress couldn't be easier. All you need to do is go to Settings>Media and then set your maximum image width and height - this will mean that WordPress will automatically reduce the size of your images when you upload them.
Smush Your Images
A way to reduce your image files even further would be to use Yahoo's Smush.it service that compresses your images. All you need to do is to to paste the URLs of the images on your website and Smush.it will then compress them for you - saving some time on users having to load them.
You can also download the Smush.it plugin for WordPress that will automatically compress your images when they're uploaded via WordPress. This can save no end of upload time in the long-run so I'd definitely recommend this.
The more of your site that you cache the better. Web caching works in a way to reduce latency by storing various of components of your website on a web server so that they don't need to be loaded every time a visitor returns to the site. This can be one of the biggest factors toward improving your page load performance.
The best way to go about setting up caching on your WordPress blog is to use the W3 Total Cache plugin. There are a few different caching plugins available but this is the one that I use and am familiar with - so I can personally recommend it to you.
Set up a Content Delivery Network (CDN)
Using a CDN is an incredibly effective way to reduce your page load times. A content delivery network (CDN) works by using 'edge servers' to deliver the content of your website to your visitors by routing the data via local servers. For example, if you have a visitor from Finland then the CDN will load the content from a local Finnish IP to reduce the loading time of files.
You can set up a CDN using a wide variety of different services. The one that I use for a number of my different WordPress websites is CloudFlare. It's completely free to use and can be fully set up within a few hours of inputting all your data. I recently managed to shred off 2 seconds from my page load time on my travel blog by setting up CloudFlare's CDN on my site.
Set Expiry Dates in Your .htaccess File
Setting expiry dates within your .htaccess file can also help trimmed down your page load times and it's really easy to do. Here's some code that you can paste into your .htacces file that will set up the expiry dates across various different file types:
After carrying out these few tasks on my blog I managed to raise my page speed grade from 74% up to 87% and my YSlow Score from 64% up to 73%. I also reduced the number of server requests being made from 107 down to 85, the total page size was reduced from 1.72MB to 1.27MB and the actual page load time from 5.63s to 3.97s - not bad for 20 minute's work!