How fast does your WordPress blog load? Have you tested performance on mobile as well as desktop? Did you know that performance is one of metrics that Google uses to rank sites?
When talking about performance its important to remember that around half of all traffic these days comes from mobile devices, and these devices can often be on limited data connections. So when you look at site performance (as with web design these days) you should adopt a mobile-first strategy.
I used a tool https://testmysite.withgoogle.com/ to check on the performance of my WordPress blog, and it reported that my site takes 7 seconds to load over a 3G connection – which apparently results in me losing a quarter of visitors that simply give up before the site ever loads!
Google has a goal that its sites should all load within half a second. That level of performance might not be achievable for everyone, but we can all do better.
So how do you optimise your WordPress site to load more quickly?
1. Keep pages small
A testing tool like GTmetrix can tell you how fast your page loads, and how big your page is. If you are loading lots of images, videos and scripts, then the size of your site could be huge – and therefore slow – without you realising it.
My site comes in at just over 1MB which is actually pretty good. If yours is more in the range of 3-5MB (or even more!) then you need to start thinking about page size.
Reduce the number of posts displayed on your page. Do you really need to show 10 posts at a time? I have my site set to only show 5 posts at a time, and by halving the number of posts I also halve the page size!
Also think about whether you need all the content served from 3rd-party sites, such as Facebook or Twitter, that could be slowing down your site.
2. Minify your code
3. Optimise images
A picture paints a thousand words, but it can also slow you down!
Loading lots of large images can be one of the primary causes of poor site performance. So consider the number and size of any images you display. Obviously for a photographer’s portfolio site you’re going to need to show large high-quality images – but you don’t need to show them all on one page.
Use a plugin such as Smush to automatically optimise images as you upload them to your site. It will reduce the file size of your images without losing any of the quality.
4. Eliminate unnecessary plugins
It’s tempting to keep installing more and more plugins to help add new features to a site – but every time you add a new plugin, it’s more code for WordPress to have to run before it can render your site. So have a clear out and get rid of any plugins you don’t need.
It’s also a good idea to minimise the number of plugins and themes you have installed for site security. The more plugins and themes from different authors you have installed, the higher the potential sources of vulnerability to hacking.
5. Select your hosting account carefully
Not all hosting providers are the same, and although most will allow you to run WordPress from your account the performance of sites can vary wildly from one host to another.
If you’re shopping around, look at hosts that have specific WordPress optimised hosting. I like SiteGround as they have optimised their hosting to serve WordPress sites as fast as possible.
And if you’re getting a lot of traffic to your site, then ditch the shared hosting and get your own virtual or cloud server. It will give you a lot more resources to serve a lot more people at once.
6. Upgrade PHP
PHP is the programming language that WordPress runs on, and many hosting providers use an older version of it by default. However if your host allows you to upgrade to a newer version (or they can do it for you) then your site will get a good performance boost.
When upgrading from PHP 5.6 to version 7, WordPress performance doubles!