6 Ways to Improve the Performance of your WordPress Blog

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

Use code minifying plugins such as Autoptimize to reduce the size of your HTML, javascript and CSS files by removing all unnecessary space in the source code. It won’t have any effect on the way your page looks, but it will reduce the size of the files being served.

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!

Source: http://www.zend.com/en/resources/php7_infographic

Password length for my eir

While many online portals are embracing two-factor authentication and other security best practice, our telecoms utility eir seems determined to stop us using good quality passwords.

As you can see from the screenshot below, the self-service portal my.eir.ie doesn’t allow users to set passwords longer than 10 characters.

The error message on screen also notifies anyone (including potential hackers) that all passwords for the system are between 6 and 10 characters – which would be a massive help to anyone attempting a brute-force attack on the site, as it would reduce the number of password combinations they need to try.

This is a shocking example of bad security by design, and is a carryover from the old Meteor self-service portal. Someone at some time in the past chose to limit password length, which forces people to use short insecure passwords.

WordCamp Belfast 2018

I've been going along to some of the Dublin WordPress meetups in the last couple of months, and one of the things they suggested is for people to attend the WordCamp conference in Belfast.

It takes place over the UK bank holiday weekend of 25th-27th May 2018, in the Queen's University, and is for anyone who has a interest in WordPress. There are sessions for developers, designers, bloggers, and business owners.

Myself, I like to tinker with WordPress for my personal sites and blogs, and am keen to understand a bit more of the technical stuff – so I think this conference will be really interesting.

It also gives me the opportunity to get my techie geek on in a environment with like-minded people.

Migrating my WordPress blog to SiteGround

I was looking around for a different web hosting company, and decided to give SiteGround a try, because they seem to have a good quality service at a reasonable price.

I signed up for their GrowBig hosting plan that allows you to host multiple domains/sites on one account, and also fully supports the Let's Encrypt free SSL service

Google are keen for the whole of the web to be encrypted. They announced a few years ago that they started to boost web pages in their search results that are hosted on secure sites, and also that later this year the Chrome browser will highlight "Not Secure" web sites.

I had already played around with installing an SSL certificate for my richardbloomfield.com site, but SSL certs can be expensive to buy and maintain, and my old host would only allow me to install one cert on my shared hosting account – so I could only secure one of my domains.

To perform the migration of my WordPress blog between hosts, I followed the instructions on this page:

How to Move WordPress to a New Host or Server With No Downtime

It uses a plugin called Duplicator that does all the heavy lifting of creating a complete backup of your existing site – including the WordPress database (that stores all your posts, pages, comments, and settings), and all the WordPress files (the WordPress software itself plus any themes and plugins you've installed).

The blog installed without any problems on my new hosting account, and I was left with an exact copy of my old WordPress installation.

Then all that was left was to log into the SiteGround control panel and enable the Let's Encrypt SSL for that domain with a couple of clicks, and I was all set.

I also installed the SG Optimizer plugin that allows me to make use of the SiteGround dynamic web cache (which really speeds up my web site) and allows for a one-click option to force all blog traffic over the HTTPS secure connection.

You might want to whitelist your favourite web sites

Adblock plugins for web browsers are great! They block out all the annoying and distracting adverts on web pages, and make the browsing experience for visitors altogether more pleasant.

They're very popular – so popular that some web site owners are getting hurt from the lack of ad revenue. Publishers are fighting back using pop-up messages to try and persuade you to disable the adblock – and some even block access to their content until you whitelist them.

I'm not a fan of forcing people to turn off their ad blockers, but I have been thinking recently about the impact of using them.

I read an article a few days ago about a popular site that closed down because it wasn't making any money – and they cited the lack of ad revenue as a major contributory factor.

So it got me thinking about some of the websites that I visit every day – the blogs and news sites that I rely on for information and entertainment. I didn't like the idea that they might suddenly disappear because they had become financially unsustainable.

And so, short of actually sending the publishers of these sites money – something that's often not even an option – I realised that the only way I could give them my patronage was to whitelist them in the ad blocker. At least that way, they could earn a little bit of revenue from my visits. And I figured it was a small inconvenience for me to bear in order to support the writers I enjoy.