They’re some of the most often-asked questions by people concerned about the performance of their websites:
Why is my WordPress site so slow?
And what about loading time — how fast my website should really be?
The correct answer usually drive them crazy because…it depends!
We all agree that, nowadays, we have no excuses: the desired load time that all websites should reach to rank better is well-known and—yes, you guessed it right—it should never be above 3 seconds.
But this number is influenced by a broad spectrum of factors.
In this article we’ll dive into the secrets of page speed optimization for a WordPress site, and how to measure it. We’ll also see the 8 most common errors causing slow loading times, and how to fix them.WHAT IS THE IDEAL LOAD TIME FOR A WEB PAGE?
Load time is the metric that describes how long a specific web page takes to load as a whole. This process includes HTML but also all the CSS code, scripts, images, and third party resources that can be found on a website.
We can define load time as the time frame between the moment a user starts navigating to the page until all of its page content has loaded
It’s a fact that, ideally, a performant page should load in less than two seconds. This is especially true for mobile pages, which suffer the most from long load times.
2018 was the mobile-first year: in March, Google announced that they were ready to switch to mobile-first indexing. The mobile version of the content of a website is now at the core of indexing and ranking.
According to Google 2018 updated research, the average full load time of a mobile landing page has dropped by seven seconds (from 22 in 2017 to 15 seconds in 2018).
This should be a piece of good news, isn’t it? Well, not really
Google found that more than 53% of visits are interrupted when a mobile site takes longer than three seconds to load. This makes mobile conversion rates lower than desktop:
As page load time goes from one second to seven seconds, the probability of a mobile site visitor bouncing increases 113%. Similarly, as the number of elements—text, titles, images—on a page goes from 400 to 6,000, the probability of conversion drops 95%.
We also have to add page weight to the picture. According to Google, at the beginning of 2018, 79% of web pages were over 1MB, 53% over 2MB, and a worrisome 23% over 4MB.
Long load times together with bloated page sizes are the real enemies of web performance.
To learn more about page size issues, check out our guide about how to resize images in WordPress.
Now, let’s focus on loading time.
Load time is not a simple metric, a unique number that says it all.
The ideal load time of 2 seconds that we defined in the previous paragraph is the final result of a sequence of events.
When you open a page (because you clicked on a link, typed a URL on the browser or reloaded the page), you trigger a series of actions happening in the background of the website.
You might not notice it (especially if the website is super fast), but there are around 20 actions taking part in this process:
Each of these different actions will take its time to occur: they all contribute to the final load time of the page.
We can group these action in four types of events:
The time needed to go from event 1 to event 4, is the load time. All speed test tools include these events in their load time calculations.
Most speed tools will even go further and tell you what happens after the onLoad.
They usually add a metric called Fully Loaded, which includes the activities triggered after the main page fully loads, and no network activity has occurred for 2 seconds.
Load time may seem a simple number, but as you can now see, staying below 2 seconds is a real obstacle course!
Now that you know the theory of what lies behind load time, you have to practice and measure it. 🙂
There are plenty of speed test tools to choose from, and most of them are entirely free. These are our seven favorite choices:
Each of these tools give you in-depth analysis of your web performance. They provide a loading time in seconds, and many different recommendations to fix performance issues.
It’s also important to remember what Addy Osmani says in his article Web Page Usability Matters:
there isn’t a single metric that fully captures the “loading experience” of a web page.
To master the technique of web speed measurement with Pingdom, read our guide: How To Correctly Measure Your Website’s Page Load Time.
If, on the other hand, you’re more curious about PageSpeed Insights, you can learn how to read and understand its audit powered by Lighthouse.
One of the first things people observe when they measure their site speed with different tools is the different results they get.
This doesn’t mean that one tool is right and another is wrong: they only might be using different sets of recommendations, locations and, sometimes, metrics.
For example, we studied the differences in the results generated by Pingdom, GTMetrix, and WebPageTest.
The best practice for a reliable load time assessment is to establish a benchmark of your site speed using different tools.
The most reliable tools are those that can provide numbers, not only general recommendations depicted with a score.
Remember that speed is the only metric that counts for real performance. Neither your real visitors nor Google will ever see your website’s “grade.” In fact, for SEO Google only considers your website’s load time.
All the other recommendations you see on most speed tools are useful to locate pain points of your site performance: but if they don’t come along with a real load time measured in seconds, your speed assessment will be incomplete.
While Google Analytics is possibly the most popular platform for monitoring site performance, it’s not the best choice to assess your site real speed.
The reason for its inaccuracy lies in the fact that the Page Load Time defined by Google Analytics comes from a sample of the total page views on your site.
This means that the speed calculated by GA only represents a handful of your page views: it’s not a full picture, because the sample won’t include enough data to assess the real speed of your pages.
At this point, you should know everything about load time and how to measure it.
The last point we’re going to see is a look-back to the most common errors that people do on their WordPress sites that end up affecting their speed.
1. The static resources of your pages are not cached
2. HTML, CSS and JS files are not minified
3. GZIP compression is not working
4. Your site has too many HTTP redirects
5. You’re not perfectly optimizing your images
6. You chose a cheap hosting provider
7. You’re still using an obsolete PHP version
8. You’re not regularly checking your website speed
But they can quickly turn into a burden for web performance if you don’t cache them.
The first method to make them load faster is by caching them. There are several free and premium caching solutions for your WordPress site.
WP Rocket is one of the best premium cache plugins: it will make your site run at the speed of light immediately upon its installation.
We’re not going to handle caching in this article, but for an in-depth explanation of what page cache is you can read our article Caching for WordPress, Explained in Plain English.
Minification is an essential technique of code optimization. Every WordPress site can benefit from it.
Since this action reduces the size of your files, it will also contribute to the improvement of your site’s load time.
WP Rocket gives you the possibility to minify your files in just one click.
Depending on the code of the theme or plugins you’re using, not 100% of CSS/JS files are *always* minifiable. Sometimes it will be necessary to exclude some of them from the process.
Another basic code optimization technique you should implement on your site is GZIP compression.
GZIP is a free algorithm that quickly compresses CSS, JS and HTML files and reduces their size.
The final result is straightforward: if your code is compressed, it will load a lot faster.
This compression is used on the server side: to understand if your site is using it, you should check it with your hosting
To understand more about GZIP compression and how to check if it’s working, check out our article What Is GZIP Compression for WordPress?
Your website is usually not a static entity: it grows and changes as it gets older.
That’s why keeping its structure neat is very important for your website’s health.
As pages become obsolete, new technologies come up or user interface changes, page redirects will likely tend to accumulate, creating redirect chains.
The more links your site is redirecting, the longer the user will have to wait to land on the desired page.
For more detailed info about how to avoid landing page redirects, check GTMetrix explanation.
Image optimization is a bittersweet topic for all people dealing with web performance optimization.
But there’s no way to escape from it: if you need to upload images on your site, they *have* to be perfectly optimized to load quickly.
If we could give you 3 essential tips to boost the loading of your images, they would be:
For more details, read our super guide about image optimization here.
“Free“ or “cheap“ sound really tempting when speaking about a hosting service, but your website won’t thank you if you give in to temptation. Choosing a good hosting provider is vital to run a healthy and successful website.
A cheap hosting plan usually comes with a lot of limitations that will end up hurting your site or oblige you to upgrade very soon to a superior plan.
Restricted storage limit, small amount of bandwidth, security issues or general instability are only some of the cons that you may encounter if you rely on a cheap hosting service.
It’s true that the hosting offers on the market are pretty vast, and making a decision might be tough: you can choose among shared, managed, VPS or dedicated hosting.
With that in mind, remember that picking up a hosting service based only on its price is a bad option.
Besides the cost of the service, your choice should be based on other relevant factors, such as:
To dig deeper into the subject, you can read our guide Shared vs. VPS vs. Dedicated vs. Cloud Hosting: Which One Should You Choose?
If you need some help with the interpretation of hostings most common features, have a look at the tutorial How Fast is My Server?
WordPress uses PHP as its server-side coding language.
PHP is an evolving code, and it can count on a long release history dating back to 1995.
On 6 December 2018, PHP 7.3 was released: you need to make sure that your website is not using an obsolete PHP version.
The more efficient the PHP version you use, the faster your website will be.
If you update to the latest PHP support version, which is 3 or 4 times faster than older versions, your site will benefit from it.
As a bonus point, an updated PHP version guarantees a stronger protection for your website, which will be profiting from the latest security features.
Once you know how to do it, you *have* to do it!
Speed testing is not a do-and-forget thing: it’s a good practice that you have to repeat at regular intervals (even daily, if you’re often tweaking with your code, adding new plugins or advanced features).
So, measuring your speed regularly will help you notice performance issues and fix them before Google see them and penalize your site. 😉
Page speed optimization for WordPress is not as difficult as it seems, but it certainly requires you to follow very precise steps, and a lot of perseverance.
Now that you know more about load time, what are the most accurate speed test tools, and what errors you should avoid, you’re good to start with the optimization of your web page speed!
To start on the right foot, get WP Rocket now and improve loading time in just a few clicks!
What resources do you use to test your website speed? Do you want to share other tricks to boost load times? Let us know in the comments!