You’ve probably experienced it: you click on a link, wait… and wait… and finally click away because the website loads too slowly. Did you know that a slow website is not only frustrating for visitors, but also detrimental to your business? Research shows that visitors drop out en masse with every second of extra loading time. In addition, the speed of your website also affects your SEO ranking. Google values fast websites and rewards them with a higher position in the search results. In this blog post we share our knowledge and take a closer look at slow loading times of WordPress sites, the causes and what you can do about it. Attention! this article is quite technical at times and requires a basic knowledge of web techniques such as html, css, javascript and networking.
Determine if your site loads fast enough
You can of course press refresh on your PC or smartphone to get an idea of whether your site is fast enough, but that is not really a standard way or controlled environment. Your connection speed and local cache of your device will strongly influence the results. No, it is better to use an external tool that immediately gives you insight into what is happening.
An important tool is of course Google’s Pagespeed Insights. Although this tool sometimes cuts corners when it comes to handing out penalties, it is of course Google that calls the shots when it comes to your score in the search results. If you want to go into more detail, we are fans of webpagetest.org. This site gives you 300 test runs per month for free and shows you relevant statistics and a waterfall diagram of your web page rendering. We ran the test again on our homepage, which scored well for a few months and noticed that a number of adjustments did not work very well. Is this all a bit too technical? Don’t stress, go straight to the next bit and we’ll shift gears there.
We notice two things in the above waterfall: first, the loading of the hero image (the one of the landscape) takes quite a long time (almost 2 sec), although it is loaded from the Jetpack CDN. So using a smaller image seems appropriate. The use of the new Google Tag Manager also has its drawbacks: we only see the cookieyes script load after the Google Tag Manager script has been downloaded and executed. But yes, that way we are in order with the GDPR.
Another tool that you can use, which is also a bit less technical to interpret, is Pingdom. He also says there is work to be done.
Why is my site loading slow?
Ok, you’ve determined that your site isn’t loading as fast as you’d hoped after all. With the tools from the previous paragraph you can find out where the problem lies. Below are some common culprits of a slow website.
Computing power and memory
Most websites run on so-called ‘shared servers’, sometimes thousands of websites run on these machines. To prevent 1 website from influencing the others, resources, i.e. computing power, memory and access to hard disk, are limited. If your hosting package does not have enough resources, your site may respond very slowly, especially when heavy plugins such as WooCommerce and Elementor are active. You notice this by long times ‘time to first byte’, because the server on which your website runs needs a lot of time to execute all PHP files, the language in which WordPress is written, due to those limited resources.
Too many plugins
Yes, plugins are fun and they offer many new features. But too much is too much. All these plugins provide extra files that all have to be read and executed, the so-called parsing of the PHP scripts. WordPress may be the Swiss army knife and world leader in Content Management Systems (CMS), but it’s not exactly the best in class in terms of efficiency and speed. Well, life is made of compromises. Fortunately, by selecting plugins the way a foodie chooses restaurants, you can keep speed and overhead under control.
Bad configuration
Poor configuration of plugins, WordPress itself or conflicts between plugins can also cause time loss. Properly configuring media files is also crucial. Even simple things like disabling wp-cron (that’s a script that performs tasks periodically) and having it called by a real cron job can save seconds.
How do I make my WordPress site faster?
Infrastructure
The simplest solution is to add more computing power and computing power. As Jeremy Clarkson often says: “more speed and power”. Sometimes it is simply necessary, especially in the case of webshops where more resources are often needed to go through complex filtering and search functionality. How exactly you proceed to get more resources depends on your hosting provider. In some cases it is even necessary to put your website on dedicated hosting or with a cloud provider. At Stormlabs we use Web-oké’s ‘power hosting’. This is more than sufficient for the more complex webshop or website.
An upgrade to the hosting environment can mean the difference between a site that loads instantly and one that leaves visitors frustrated and clicking the back button. Keep in mind that many budget solutions for web hosting are very limited in resources and you will therefore quickly run into a wall.
Use caching
The use of caching is a widespread technique and probably the solution with the most impact on speed. On the one hand we have client-side caching, where certain elements of your website are stored locally on the visitor’s device. This means that on subsequent visits, much of the necessary information is already available on the device itself (such as images) and does not have to be retrieved from the server again, which can significantly speed up the loading time.
On the other hand, you have server-side caching: Instead of executing all the code when loading each page to eventually generate an HTML page, a caching plugin keeps a copy of that HTML page. If the page is not dynamic, like the blog post you are reading now, and therefore does not change for every visitor, the cache can immediately forward this page without having to rebuild it first.
There are several plugins available for WordPress that do caching. The most popular is undoubtedly WProcket. We are especially a fan of Litespeed Cache, also because it would work better with the Litespeed servers on which we host our websites. Both plugins do everything in one, so you don’t need three different plugins to perform the optimizations described here. It is of course also possible to choose one of the hundreds of other plugins.
A clean database
Often overlooked but not unimportant, and easy to optimize, is the database. Almost all data in WordPress, except media, is in an underlying Mysql database. After a while this database will be ‘polluted’ with superfluous data. Every time you click on ‘Publish’ or ‘Save draft’ you create a version of a document. So even if you only need one version in the end, which you want to show to your visitor, all previous versions will remain present. Everything in the recycle bin also sticks to the database until it is permanently deleted. With the Litespeed Cache plugin or WP-Optimize you keep your database clean. By removing all unnecessary rows from the database you save time, but don’t expect too much profit from this.
Use a CDN
Another solution that is ‘set and forget’, but requires some technical knowledge to set up, is the use of a CDN or Content Delivery Network. CDNs act as a middleman between your server and your visitors, allowing them to reduce load on your server, fend off attacks, and improve load times by leveraging their global network of servers, among other things. An example of this is the Jetpack plugin that allows you to move your media files to their servers. This relieves your own web hosting package. An even better solution is Cloudflare that offers a total solution. Cloudflare will not only serve your site faster from their CDN/cache, but will also block hackers and bots with less good intentions. Cloudflare offers a ton of other services that would take us too far. But remember that they have a free plan that the average SME can use. To set up Cloudflare, you have to change the name servers of your domain, but you should already know what to do.
Combine and minify stylesheets and scripts
Each extra byte of data that needs to be loaded can slow down your website’s loading time. That’s why optimizing and minimizing your code is so important. By removing excess space, comments and other unnecessary elements from your HTML, CSS and JavaScript, you can significantly reduce the size of these files and thus speed up your website. Plus, resizing and optimizing images and other media can have a huge impact on your site’s load time. You can also choose to load CSS and Javascript asynchronously, but this can have strange effects on your site during loading. The execution of javascript can also be delayed, but this can also cause bugs. While minimizing (minify) and combining (combine) are easy options in the plugins mentioned above, it takes in-depth knowledge and experience to get the most optimal settings without breaking anything.
Optimize media
All images, illustrations, videos… on your site should be made as small as possible. A simple solution is to use a CDN like Jetpack, which takes care of optimizing and presenting images in different formats. But there are also more than enough plugins on the market that compress your images and convert them to the new WebP format. With this you can easily make images 50% smaller without noticeable quality loss! Your site gains speed and you save on bandwidth!
Above we have discussed the most common techniques to speed up a WordPress website. Of course there are more, specialized, measures possible, but with the knowledge from this article, the average WordPress website should remain under 3 seconds loading time.
But beware, without the right knowledge, problems can arise. A layout that is no longer correct, plugins that conflict with each other or even data loss are some of the risks you run if you start working without the necessary knowledge to speed up your website. Also remember that many changes are not immediately visible when you start using caching and CDNs.
That is why we still recommend that you call in a specialized company, such as Stormlabs. We have the knowledge and experience to optimize your website efficiently, so that you can enjoy a faster, smoother and better performing website. In a few hours we can significantly speed up any WordPress site, without you having to get frustrated and lost in all the different plugins and settings.
So say goodbye to your slow website and say hello to a faster, better performing site. Contact us today to find out how we can speed up your website!