Speed optimization is an important part of any WordPress site and should not be ignored. With the right tools and optimizations, you can drop your page load time from that pesky 5s under 1s easily, and here’s how to do it.
What you’ll learn in this tutorial
How to test your WordPress page speed
A great tool to test your page speed is the Google PageSpeed Insight tool which will give you a clear score from 0 – 100 and even tell you what you should improve to achieve a higher score and lower page load time.
Why is WordPress speed optimization important
People’s attention span has been getting shorter and shorter each year and because of this website speed has become more and more important each day. On top of this Google, Bing and other search engines have stated that website speed is a ranking factor.
But why is WordPress speed optimization important? Let’s have a look
1. Faster site means more visitors
If your site is slow, up to 53% of the potential visitors will abandon your site before even landing on your site.
2. Slow sites kill stores
A 2-second delay in your site speed might increase your eCommerce store’s cart abandonment rate by 87%.
3. Search Engines care about your site speed
Search engines like Google care about your site speed. If your page is slow, won’t meet the core web vitals and this will directly affect your site and page ranking potential.
4. Slow website speed drops your conversion rate
Every second it takes to load your site, your conversion rate will drop by an average of 4,42%. This means you will lose sales, affiliate conversions, ad clicks, or even email subscribers who would have otherwise converted and brought you money.
5. Slow site means a higher bounce rate
A slow site means a higher bounce rate. The slower your site is the high chance is that the visitor will only visit one of your pages, which then converts to a higher bounce rate.
WordPress Speed Optimization
Now that we know how much speed affects your site’s sales, SEO and visitor counts let’s have a look into WordPress speed optimization step-by-step and see how we can fix your site speed.
1. Hosting provider
To ensure your site works without a hiccup a fast and reliable hosting provider is the most important part of your speed optimization. Without a good host, it doesn’t matter how much you might optimize your site because the hosting will always keep you back and make it a drag to load your site.
The most important part to look at in your hosting provider is how long it takes for your site to load and how quickly the server answers. This is important because nothing can start loading before your server answers the visitor’s browser that it exists and that is ready to receive the visitor.
A great choice for WordPress hosting is Bluehost which offers speed, stability, a free CDN, SSL, and a free domain for 1 year.
The second biggest part of the WordPress site is the theme. A slow, unoptimized, or simply badly coded theme can slow down your site immensely. Using outdated methods and old PHP in code will affect your site’s speed but it will also make your site more vulnerable. Because of this we highly recommend using a theme that has been battle-tested and known for its speed.
Here are a few facts that make Hello Theme a great theme to start with:
- Loads in 1/4 Second
- The theme loads in the blink of an eye, giving your users a seamless experience on your website.
- Only 6 KB
- Hello only requires 6 KB of resources, making it significantly lighter than most themes.
- Requires 2 Requests
- With minimal requests sent to the server, visitors will see your website at record speed.
If Hello Theme isn’t your piece of cake, here are a few other themes we can highly recommend. All these themes work great with the Gutenberg editor or Elementor. Each theme is also highly rated and used by thousands of WordPress users.
For more great themes don’t forget to check the WordPress theme library which only accepts themes that follow WordPress theme guidelines.
As someone once said, the more plugins you got on your site the more bloated it will get. This means more and more code that needs to be executed, meaning longer load times and heavier sites. Old, outdated plugins also affect your site’s security by increasing your site’s exposure to the outside world and might give unwanted users access to your WordPress admin through unfixed vulnerabilities. So make sure you are only using the plugins you need.
Steps to go through with your WordPress plugins
- Log in to your WordPress admin
- Go to Plugins
- Check each plugin that they are up to date and if not, update them
- Go through each plugin and check if you actually need it or can you simply remove the plugin from your plugin library.
- Are you using a plugin just for one feature and can that feature be replicated some other way so you don’t need to bloat your plugin library for nothing?
4. Reduce your image sizes
A lot of bloggers, website owners, and even eCommerce owners forget is that image files can be quite large. Every time visitors come to your site they are forced to load these images and the bigger the image is the longer it will take for them to load your site. Because of this, it’s important to optimize your image sizes and to ensure they are as small as possible. A great way to do this is to set up images max size to 2048×2048 px and use new image formats like .webp.
Why should you use .webp instead of PNG? Simply because it .webp offers up to 26% smaller file size while still offering the high quality and transparency same as PNG.
Another way to optimize your images is to run them through an optimization algorithm that will remove excess metadata and optimize the image size as much as possible. Here are a few good plugins that can do this for you automatically like EWWW Image Optimizer (Recommended), ShortPixel (Recommended), and Smush.
5. Enable Lazy Loading
Lazy loading is a feature that allows your site to delay image and video loading until they are needed. This is done to improve your site speed and performance while saving system recourses. This can be done by adding a string of code to your images or through plugins like WP Rocket or Smush.
If you wish to do this through code you need to add loading=”lazy” to the image as shown in our code example below.
<img src="image.png" loading="lazy" alt="…" width="200" height="200">
There are a few things to consider and to test when you decide to add lazy loading to your site’s images:
- Are any images broken or not loading?
- Are images indexing correctly?
- Has there been any significant increase in page speed after implementing lazy load?
If you manage to check all these and there seem to be no problems then go ahead and give lazy loading the green light and enjoy faster load speed.
6. Limit blog post and page revisions count
You might have not known that WordPress automatically saves revisions of every blog post and the pages you make. This means that when you work on a blog post or a page it might have multiple different versions saved to your database. Over time these things start to pile up and bloat your database which again means that every time a call needs to be made to your database, it will have to go through all this data and the bigger the database the longer it will take to find the correct data for you. To solve this problem you need to limit how many revisions of each blog post and each page WordPress is allowed to save to the database. We highly recommend you to set this number between something like 4 – 10 to not have too many revisions saved up.
To restrict how many revisions are saved to your database you can use this simple code which you need to add to your wp-config.php file.
define( 'WP_POST_REVISIONS', 4 );
If you already have a blog, site, or eCommerce store you have been running for a while and need to clean up some old bloat from your database, a simple fix for that is to use a plugin like WP Sweep. WP Sweep can quickly and easily clean your database from all the bloat it might have regarding revisions.
Just remember to grab a backup of your site before doing any sweeping.
7. Disable WordPress emojis
In an earlier post, we talked about emojis and how most pages don’t actually even need them, but WordPress still has support for them. To disable emojis and lower the unnecessary HTTP calls read our guide on “How To Disable Emojis In WordPress“
8. Use the right PHP version
As PHP has evolved so has its speed. To ensure you have the most optimized, latest security and fastest PHP available check your PHP version and use the highest one you can use on your site without breaking anything. This will ensure much faster page load and processing because WordPress and most plugins connected to it will use PHP as their main programming language.
To check what PHP version you have active on your WordPress simply log in to your WordPress dashboard select Tools > Site Health > Server and there you can see your server’s current PHP version.
9. HTML, CSS, and JS minification and compression
If you are more of a code-savvy person then we highly recommend minifying and compressing your HTML, CSS, and JS files. How this usually works is by compressing multiple HTML, CSS, or even JS files to one single file each making it faster for the browser to load since they are not required to load and read multiple smaller ones. Another important factor is the fact that when files get minified and compressed the spaces in code are usually removed completely. This makes it harder for humans to read but makes it much faster for machines to read since it doesn’t have to read empty spaces anymore.
If you are not a code-savvy person or don’t know how to do this don’t worry. There are tools like WP Rocket that has built-in HTML, CSS, and JS compression which means it can do this for you without touching the original files. Another service that can do this for you (while doing much more than just compression as well) is the NitroPack.
The cache is a way to save a small amount of HTML, CSS, and in some cases even JS to the visitor’s browser so they don’t need to request that same data later on from your server. This means that the visitors will be able to load up your site much faster the next time they visit your site since there are fewer files to load.
There are a lot of cache plugins for WordPress and most of these work amazing for example WP Rocket, W3 Total Cache, and WP Fastest Cache. Though mainly cache should be done on the hosting level we highly recommend getting familiar with WP Rocket or even services like NitroPack to get your caching in order.
11. Fix HTTPS / SSL Errors
HTTPS and SSL errors will cause your site either to be completely out of reach or redirects that will generate longer page load times because the visitor needs to be redirected from the wrong link to the right one. The quickest way to notice if you have an HTTPS error or more commonly known as a mixed content error is simply to look for the lock on your browser’s address bar. If the lock isn’t shown or is shown to be open you might have a mixed content error.
To find out what’s causing the error you can use a free site like Why No Padlock and it will tell you exactly what’s causing this error. Though it might not be able to find out all mixed content or SSL errors, it’s a great place to start.
To fix these errors you can simply do it by hand and change all your links to HTTPS from HTTP or use a plugin like Really Simple SSL that can do this automatically for you.
CDN or more familiarly known as Content Delivery Network is a network of servers that save a copy of your site to different machines around the world. When a visitor wants to connect to your site the CDN then delivers this copy of your site to the user and speeds the speed of your site by offering it often much closer to the user than if the visitor had to load it from your site’s server which might be much further away than the CDN server.
For CDN we recommend setting up a free Cloudflare account or using NitroPack which has its CDN packaged into its system. NitroPack also integrates with Cloudflare so you can use both together to achieve even better site speed results.
The third option is to use the RocketCDN which is a CDN provider built for WordPress.
WordPress speed optimization no-code solutions
What no-code solutions are there to speed up your WordPress site then? Well, there is the NitroPack that can do pretty much everything listed earlier on our ultimate guide, and then there is the WP Rocket that can also do a lot of the same things though works in a bit of a different way.
NitroPack is an all-in-one performance optimization service. It combines everything you need for a lightning-fast website. Image optimization, code minification, caching, CDN, lazy loading – you name it, NitroPack has it.
WP Rocket is an open-source web performance premium plugin for WordPress. The plugin uses caching to accelerate website loading times. Launched in July 2013, WP Rocket has over 1.6 million active installs.
If you liked our guide, feel free to share this post, and don’t forget to comment below on how you have managed to speed up your WordPress site.