Skip to content
Article 29.01.2020

Improving the loading speed of WordPress websites

In this blog article we go through 8 ways you can easily optimize the loading speed of your WordPress site and thereby increase your sales.

Website loading speed has a big impact on your site's conversion, that is, on how well your website generates sales or inquiries. Slow-loading pages drive a potential customer away immediately, even if other factors such as the site's content, design or sales funnel are in order. According to several studies, for example, a slow web store is one of the biggest reasons for abandoning a shopping cart and leaving an order unfinished. Worldwide, slow websites therefore cause considerable losses.

You have probably turned away from a website yourself at some point because it opened slowly? And perhaps moved on to click the next, faster-loading link in Google's search results? You don't want your customers to have to do the same, do you?

When planning the usability of a website, it is worth investing in its speed. Search engines also rank fast-loading pages higher in their results, so this also has the effect of improving search engine visibility. Read this article to learn how to avoid the worst pitfalls and get your pages to load lightning fast.

Bicycle with WordPress logos as wheels, locked to a bike rack

Measuring website speed

In addition to your own subjective experience, a website's loading speed can also be assessed with various measurement tools. For example, the Pingdom Website Speed Test tool gives a good picture of your site's speed and of any problem areas that may need fixing.

You can easily test your site's speed by entering your site's URL and selecting ”Europe - Germany - Frankfurt” from the ”Test from” menu, so that the test is run from the nearest location (from the perspective of Finnish users). As a rough rule of thumb, a loading time under one second is already good for your pages, and a loading time of over a couple of seconds starts to show as sluggishness when using the site.

Another alternative tool is, for example, GTmetrix, but its nearest test server is located only in London (as an unregistered user), so the speed results are not as reliable for servers located in Europe. However, compared with Pingdom's equivalent, the tool offers perhaps even more detailed data to support optimizing the site.

The Google PageSpeed Insights tool can also be used to measure speed. This tool gives you separate assessments of the site's mobile speed and desktop speed. However, you shouldn't follow PageSpeed's scoring too slavishly, since it doesn't correlate directly with the site's speed; the score also includes other factors related to the site's user experience.

So what can be done about slow pages?

A site's sluggishness can have several different causes: the web server of the web hosting you use may be congested, overloaded or at the end of a slow foreign connection, the site may use unnecessarily large and heavy images and media files, or the site's other technical optimization may not have been done.

You can best influence server speed by choosing a reliable web host whose server systems run fast. If you are already a Hostaan customer - congratulations! If you are not yet, we warmly recommend getting to know our web hosting products built on the world's fastest domestic UpCloud cloud service here.

In this article, however, we look in particular at how you can speed up the loading of a website built with the WordPress content management system, using WordPress's own means and its free plugins. These instructions are therefore useful even if you are not yet our customer.

Hand holding a WordPress logo

Optimizing a WordPress site

As the world's most popular content management system, WordPress is the most widely used publishing engine for building websites. Because of its extensive extensibility, it can easily make your website heavy too. Fortunately, quite a lot can be done about it fairly easily. For comparison, the article also goes through the differences with Hostaan's Kotisivukone, which we offer as an alternative way to build fast websites easily.

Before starting the optimization work, you should take a backup of your website following our instructions, so that you can restore the previous state if something goes wrong during the modifications. (If necessary, follow your own web host's instructions for making backups.)

It is also of course sensible to measure the site's speed with the Pingdom tool mentioned above before and after the changes, so that you can see to what extent the measures taken improve your site's speed. The test also shows you, for one page at a time (for example the front page), the page's download size and the number of requests it causes, and you also get recommendations for speed-up work to be done.

Method 1: Shrink unnecessarily large images and media files

If you have uploaded image files to WordPress without processing them small enough, your site may have to load a large amount of unnecessarily high-resolution images. There are several modules available for automatic image size optimization, and the free WP Smush, for example, is one recommended option.

Smush compresses and shrinks images without significantly affecting their quality. The plugin also has a so-called Lazy Load feature, which loads images onto the screen with a delay as they are needed, which speeds up especially the loading of pages that have a lot of images and text content on a single page.

Method 2: Use a WordPress caching solution

The database queries made by WordPress pages can be reduced by saving the page in a cache for the next user. The PHP interpreter then doesn't need to generate the page from program code every time; it is found ready-made in the cache and thus loads considerably faster for the user to see.

However, the use of caching should be considered carefully on sites whose content can change constantly (for example web stores). Any compatibility problems with the cache should be tested carefully to avoid surprises (e.g. the updating of the shopping cart or stock levels).

  • The easiest way to enable caching in WordPress is, for example, with a plugin called WP Super Cache.
  • Alternatively, the paid WP Rocket offers slightly more features

Through Hostaan there is also NginX's own server-level cache available, which works faster than software-based caches. Enabling it is done through customer support (except in our SmartWP and SmartWoo packages, where caching is already configured on by default.) However, Nginx, which is on by default, already acts as a proxy in front of our web server, handling static requests very quickly. In that case, speed can be improved significantly with WordPress's own caching solution as well.

Method 3: Use a CDN (Content Delivery Network)

A CDN, or content delivery network, makes it possible to load your website's content from several servers located around the world, always from the one nearest to the user. This speeds up your site by distributing the load across several servers and several geographic locations.

There are several CDN services, but one of the easiest ways to start using this feature is to install the Jetpack Site Accelerator plugin in WordPress.

With the plugin, WordPress's static files and images are delivered through Jetpack's worldwide CDN. However, this is a so-called partial CDN, in which a significant portion of the files still remains on the original server. The solution does not, however, require DNS-level name server changes, so you get most of the benefits of a CDN in the easiest way by installing just a single module.
 

Method 4: Use Gzip compression on your pages

The less the browser has to download, the faster the site opens. The site's download size can also be reduced by using Gzip compression, in which case the page content, CSS styles and Javascript files are compressed to a smaller file size before being sent to the browser.

You can check, for example through this site, whether the web server you use supports Gzip compression.

Enter your website's URL in the search. If you get the response ”Gzip is enabled…”, support is there. All of Hostaan's web hosting plans support Gzip compression by default.
 

Method 5: Delete old revisions and optimize the database

WordPress tends to slow down over time, because it continuously saves old published versions, that is, revisions. In addition, unnecessary data that slows down the site's operation gradually accumulates in WordPress's database.

You can delete old revisions and clean up and optimize the WordPress database with, for example, the WP Optimize plugin. If you wish, you can also reduce the creation of revisions by making their automatic creation less frequent, from one minute to five minutes, and by limiting the number of revisions kept to five. This is done by manually adding the following lines to WordPress's wp-config.php file:

define(’AUTOSAVE_INTERVAL’, 300); // seconds

define(‘WP_POST_REVISIONS’, 5);

NOTE! The WP Optimize plugin also includes features related to caching and image compression, but for compatibility reasons it is best to avoid using them if you already use, for example, the Smush and WP Super Cache / W3 Total Cache / WP Fastest Cache plugins mentioned above. Alternatively, you can reduce the number of plugins by consolidating these functions in the WP Optimize plugin as well, if you find it a workable solution.

Method 6: Remove unnecessary plugins

Various functions are easy to add to WordPress with plugins, and these are very easy to install with a couple of clicks. However, a large number of plugins also leads to the site slowing down, so find out which plugins you really need.

Remove the unnecessary WordPress plugins (and themes too) that you don't use. This also increases the site's loading speed and security, makes maintenance easier and reduces various compatibility problems. It is recommended to replace social media plugins with each social platform's widget or with a plain link on the page to the social media profile.

You can use, for example, the Code Profiler plugin to analyze which WordPress plugins slow down your site the most.

Method 7: Use a lightweight theme and avoid unnecessary effects

This tip is useful mainly when planning a new site, but of course some measures can also be taken for existing sites. It is worth putting effort into choosing a lightweight theme, because a large share of ready-made themes are really heavy and slow the site down significantly.

The at times heavy Javascript effects of many themes also slow pages down significantly, so it is worth considering carefully whether using an effect is necessary for the site's content or whether a faster user experience would be better by switching the effect off. In general, it is easier to build a fast-working site that offers a good user experience with a lighter and simpler theme.

Method 8: Move your website to a faster server

If none of the previous WordPress optimization measures still produced a sufficient speed improvement, as a last resort it is recommended to also consider switching to a faster provider.

Hostaan Oy offers very fast domestic web hosting. Our server is built using UpCloud, the world's fastest cloud service, so pages open really briskly. The software server solutions we use (including NginX, HTTP/2, the latest PHP version, Plesk, Let’s Encrypt SSL, 24/7 monitoring of the server systems) speed up your site and increase its security, reliability and operational dependability. See here a comparison in which the loading of a WordPress site became 8 times faster after becoming a Hostaan customer.

In addition, our customer support, which serves by phone, chat and email, has received praise especially for its promptness and expertise. If you wish, get to know the services we offer on our website.

All articles