Speed up your WordPress website
In this week's newsletter, we'll be taking a look at one of the most important website publishing tools on the internet - WordPress. Full disclosure, I don't profess to be a WordPress developer. I haven't properly used WordPress in several years. That said, WordPress sites make up a big part of the internet, and so getting performance right on them will go a long way towards delivering a better online experience overall.
WordPress powers over 40% of the internet. That's a lot of websites. When it was first released, WordPress revolutionised online publishing. It democratised it, opening up the ability to publish content online to anyone.
WordPress has grown from its early days as a blogging platform to now provide a rich ecosystem of plugins that power some of the web's leading content publishers and ecommerce sites. With that has also come performance issues, as everyday users add multiple plugins to their site only to begin experiencing performance bottlenecks.
In this issue, we'll cover some of the most impactful things you can do on the frontend to improve the speed of your WordPress website.
First, understand your site
Before getting started, it's important you determine whether your website features mostly static or dynamic content.
- Static content: This is content that is not updated frequently. For example, company information pages, general product pages, blog posts etc.
- Dynamic content: Content that's updated frequently/presented in real-time or content that requires user authentication. Examples include product inventory information, membership pages, forums etc.
Cache, cache, cache
For static sites, you can even cache entire pages. In this way, when a user visits that page the server can serve it straight from the cache, rather than having to build the page from scratch. This can give you a performance boost, as well as reducing the load on your website's server.
Check with your website host if they have caching options as part of their service. If they don't you can try out one of the plugins below:
Use a CDN
CDNs work by saving cached version of your pages and other assets on a distributed network of servers. With this in place, when someone visits your website from Melbourne, Australia they'll be served with content from the closest server. As a result, you can dramatically reduce the response times when people visit your site. This also helps further reduce the load on your website's server.
Optimise your images
Images are most likely the heaviest resources on your WordPress site. Optimising them is one of the most important steps you can take to improve the performance of your website. We've covered different image optimisation techniques in previous issues of this newsletter. For WordPress specifically, there are a few things to note:
Upgrade to WordPress 5.5 for native lazy-loading
With the release of WordPress version 5.5, image lazy-loading was added to the core build. With this in place, WordPress will automatically add the loading=lazy attribute to all images. This can be overridden by developers for more control.
Upgrade to WordPress 5.8 for WebP support
The recent 5.8 release of WordPress introduces WebP support. This allows you to compress and upload WebP images for use on your site. WebP now has really good browser support and delivers quality images at a fraction of the file size when compared to JPEG or PNG.
Use a plugin if you can't update
If something is stopping you from updating your version of WordPress, then you can still achieve great image compression and optimisations using one of the plugins below.
Pick a fast theme
The theme you choose can also make a big difference in terms of site performance. After all, it is the underlying foundation upon which your website is built. You'll want to find a theme that gives you just the features you need, without extra bloat. For example, if you're not using FontAwesome icons (and in 2021 you really don't need to), then make sure the theme you use does not ship with it (or at least has a way to disable it).
Consider this too
Another important consideration is the design of the template. Those that have feature large, hero/jumbotron images at the top of each page might end up proving problematic to your Core Web Vital scores. These might require you to take extra care in optimising the images you upload.
If you're after a fast WordPress theme then try out Granola from Wholegrain Digital. The Wholegrain team is passionate about digital sustainability, and that's part of the ethos behind Granola. For more options, you can check out this detailed list from Kinsta.
Assess the plugins you're using
Plugins can be another source of performance pain for WordPress sites. Sometimes, they're installed to solve one particular problem but then just left in place even after they're no longer required. This often causes sites to become bloated.
The easiest way to keep on top of this is to set a yearly reminder to review the plugins you have installed on your WordPress site. Ask yourself (or others in your organisation) if those plugins are all required for the site to function. Remove those which are not.
- How to Install Cloudflare on Your WordPress Site - Kinsta's guide to installing the Cloudflare plugin on a WordPress site.
- Optimising Images - The 2 part series from this newsletter covering image optimisation techniques.
- WordPress 5.8 adds WebP support - The WordPress 5.8 announcement for WebP support. This will be handy for developers.
- Granola: a WordPress starter theme built for efficiency and performance - An introduction to the Granola starter theme for WordPress.
- 11 Fastest WordPress Themes in 2021 - Kinsta's assessment of how several popular WordPress themes compare on performance.
Top 10 Web Performance Pitfalls
Jake & Surma from Google go through the top 10 performance issues Jake saw while analysing a bunch of websites. This is a really good video!
The next issue of Optimised will be in your inbox on July 9th. The website has an archive of all previous emails. It's a good place to recap on anything we've covered, and also handy to share with friends or colleagues.
As always if you've got any feedback or specific topics you want to be covered then just reply to this email.
Keep safe, stay well.