When I started using WordPress in 2010, I never imagined that over the years it would be adopted by more than 43% of the world's websites.
Despite being the most popular CMS of all, however, there are still many unanswered questions about how to speed it up and improve its performance.
In this post I would like to give you some slightly different insights on how to speed up your WordPress website, going into great detail.
The benefits of performance
Let us begin by remembering that speeding up a slow WordPress site can give you a number of benefits that are often underestimated:
- SEO benefits, as a faster website is more appreciated by search engines;
- Benefits in terms of visitors, because if our pages don't load immediately, users leave;
- The ability to work faster, as we often waste a lot of time making the simplest changes.
But how do we get a objective measurement of the speed of our site?
Speed may depend on how well it is optimised, but also on network, geographical location and much more.
In other words... counting how many seconds it takes the site to load from your computer isn't enough, because other visitors, or even Google's own crawlers scanning our pages, might have a different experience, and on the basis of that decide whether to reward you or not.
Fortunately there are tools, such as Google PageSpeed Insights, that help with just that. Simply enter the URL of the page to be scanned, wait a few seconds, and you'll see recommendations on possible optimisations appearing on screen.
It is fair to point out that although these tools help a lot and are always more reliable than our individual experience, there are factors that are very difficult, or in some cases even impossible, to optimise.
For instance, they might ask you to delete a jQuery code from your website, but this action may be totally unfeasible, because if you remove it, it may stop working altogether.
Let us now explore to the methods you can use to speed up your WordPress site.
Remove problematic plugins
Plugins are one of the main reasons why a WordPress website ends up slowing down.
We read this in every guidebook, but have you ever wondered why this happens?
There are two main reasons for the slowdowns:
- Plugins making 'outside' calls: those that rely on other websites, uploading external code, such as Jetpack.
- Plugins making 'inside' calls, but poorly optimised, those that call their own files locally, but perform operations that are too heavy (e.g. several database queries).
Deactivating all unnecessary plugins and leaving only the truly essential ones is a must. Worst case scenario, it's better to sacrifice a small feature rather than deteriorate the performance and risk penalties on the user experience and SEO side.
But there are times when we really want to get to the bottom of things, precisely identifying the plugins that are causing issues. To do so, I recommend installing Query Monitor, which allows you to navigate through the pages of your website and find out what database queries are contributing to slowing down the website.
You'll be abl to tell from a special menu that appears in red at the top of the screen, allowing you inspect and sort by loading time all calls that take place behind the scenes.
And if you recognise, among these codes, the name of a plugin you are using, you can decide whether to:
- Deactivate it completely;
- Contact the author to ask for an explanation (recommended for non-experts);
- Intervene directly, if you know how;
- Contact an expert to intervene on your behalf.
Set the cache
I often see people installing the most disparate plugins for cache management without really understanding what they do and what their optimal configuration is.
Let's start with the basics: a cache is nothing more than a set of compressed pages of the website, which are much lighter and faster than their original counterparts. These are saved somewhere and served to the visitor when they connect.
This also comes with benefits for SEO, because when a crawler scans our website and is provided with the 'cached' version, which loads very quickly, we are generally rewarded for good performance. In addition, there is less chance that users will run away from the website because it's too slow.
These two are very different:
- WP Rocket saves the page cache directly on the website. It's an easy-to-use, efficient plugin that starts working behind the scenes just by activating it.
- Litespeed, on the other hand, only works if it's installed on our web server (for example, Krystal UK uses it with very good results). So it must be configured by your hosting, otherwise installing the relevant plugin is useless. You can find out more on their website: Litespeed.
Configuring a cache is never the solution to all evils: certain elements cannot be compressed for various reasons; so caching can help with response times, but it can't solve all the underlying problems.
Pay attention: multiple caching systems installed at the same time can conflict with each other and create issues!
In order to have a fast website, it is essential to use compressed images.
In the past, I worked with photographers who uploaded several 10-20 MB JPG files on the same page, at the highest possible resolution, severely affecting loading times.
But it certainly doesn't happen only to them!
All websites should use compressed images. Not only that, they should use 'new generation' formats, for example:
- The WebP format, which is now a standard;
- The SVG format, which is a vector representation of an image.
SVGs can't be used all the time (for example, you can't save a photo in this format), whereas if you need to compress non-modern image to a modern format (such as JPG or PNG), you can use online converters such as JPG to WEBP.
Use a CDN
A CDN (Content Delivery Network) is a network that, once configured, allows you to show your visitors a version of the website that is geographically close to their position.
Indeed, your website is mantained by a hosting which has its own servers somewhere in the world, and visitors connect to these when they need to view a page.
Since the performance also depend on the distance between the visitor and the server, you understand that a site hosted in the UK visited from Italy will take longer to load than one hosted in Italy itself.
What a CDN does is nothing more than create an exact copy of your website depositing it in servers scattered around the world; this way, anyone visiting the website from Italy will connect to an Italian server, resulting in much shorter response times.
In addition to performance advantages, CDNs also offer security 'filters' that prevent spambots from accessing the website, or the automatic installation of an SSL security certificate.
The most widely used CDN is Cloudflare. It has a free plan and is fairly simple to configure, although there may be exceptions in more technical cases. The process is fully guided and involves the configuration of some new nameserver that needs to replace the existing ones for your domain.
When we say nameservers, we are talking about a set of strings, for example “max.ns.cloudflare.com” and “tom. ns.cloudflare.com“, which must be replaced with the default ones that our hosting provides us, to ensure that visitors go through this service.
Every hosting service (e.g. Aruba, Netsons, GoDaddy, 1&1, and so on) always offers a DNS Management feature where you can change this setting.
They are all different, so it would be impossible to cover them all in this guide, but if you are having a hard time, try searching for a specific guide.
Switch to a different hosting
When you're sure that you have done everything you can to optimise the response times of your website, then there is one last option left: upgrading your hosting.
In fact, the service you are using may simply not have enough resources to make your website as fast as you want it to be.
Types of hosting
There are three types of hosting:
- Semi-dedicated hosting: the middle ground. This is a hosting where we share resources, but only with a limited number of organisations;
- Semi-dedicated hosting: the middle way. It is a hosting in which our space yes shares resources, but only with a limited number of other organisations;
- Dedicated hosting: the best solution of all, in which the entire machine is allocated exclusively to our organisation and doesn't share resources.
While all hosting services offer assistance and simplified processes on their shared solutions, in the case of semi-dedicated and dedicated, some experience in System Administration is required to be able to configure everything.
This is because such solutions are designed for more experienced users and for meticolous optimisation of resources.
Fortunately, the so-called managed solutions come to our rescue, giving us the possibility of paying a little more to have a team who can assists us in technical operations on semi-dedicated and dedicated devices.
A good managed service, in my opinion, should deal with:
- Assisting us with occasional optimisation requests;
- Supporting us in case of serious issues (e.g. everything goes offline), by restoring the service;
- Helping us configure the main technical tools.
So keep this in mind: if you are upgrading your hosting from a shared service, and you are not an experienced user, perhaps you should opt for a managed solution!
WordPress itself, through its own WordPress.com, offers a hosting service for its products with different pricing levels.
It is a middle way between shared and semi-dedicated, but with important restrictions - first of all, it can only be used for website built with Wordpress.
Experienced users tend to avoid this type of service, as it's expensive and limited.
The hosting I use
For my projects I generally rely on Krystal, which is an excellent independent service based in London and with phenomenal assistance, the quality of which I absolutely guarantee (if you want to try it out, by using the code “SILVESTRI” in the checkout you will receive a £10 discount on your order, and I will also get the same).
If you'd like to receive a quote to assist you on this, contact me!
We have finally come to the end of this very long guide! I hope the advice I shared was useful to optimise and speed up your WordPress website.
Before closing, I'd like to emphasise once again how much, despite the detailed guidance, there will always be cases that can only be handled by experts with a certain experience.