A point sometimes overlooked, the loading speed of a site is a fundamental parameter for two reasons. On the one hand, a site that is too slow contributes to degrading – sometimes considerably – the user experience. No one likes to navigate a slow site. The slowness of a site results in an increase in the bounce rate, a shortening of session times, a decrease in the number of page views and ultimately a degradation of performance indicators. On the other hand, the loading speed of a website has an impact on its SEO performance. Google in particular does not like sites that are too slow and does not hesitate to sanction them by penalizing their positions. You have to work on the loading speed of your site at all costs. Here are 9 tips or tricks to improve your site’s loading speed.
1. Measure the current performance of your wordpress site
Before even talking about the techniques to improve the speed of a WordPress website, here are some tools that will allow you to calculate the loading time of your site , to make an inventory. There are lots of tools online to measure your site speed: YSlow, GTmetrix, Pingdom Tools, Web Page Analyzer, Load Impact, Octa Gate SiteTimer, WebPage Test, Yotaa. It is advisable to use several measurement tools for your tests and not to limit yourself to just one. This allows cross-checking and more reliable results to be obtained.
Google’s performance testing service, PageSpeed Insights , is one of the go-to tools. This service makes it possible to obtain an “objective” evaluation of the loading speed of your site both on mobile and on computer. The performance of a site is indeed often variable depending on the terminals used, the location of servers, etc. Another advantage of PageSpeed Insights: the service gives you personalized advice, ranked in order of priority, to remedy any failures identified during the test (concerning the weight of your images, the management of JS and CSS files, caching, etc.).
To go further: you will find on the internet many reviews and tutorials about performance measurement tools, including an article that compares 10 completely free tools .
2. Remove unnecessary extensions (or plugins)
Let’s move on to techniques for optimizing the speed of your site. The extensions first. WordPress is known to offer hundreds, and even thousands of extensions . This is what is largely the richness and interest of this widely used CMS. Suddenly, we instinctively tend to want to install as many plugins as possible to increase the functionality of our WordPress site. This is a serious mistake. What matters is the quality of the extensions used, not the quantity . This is valid for all CMS, but in particular for WordPress which has a gigantic community of developers but not always very experienced (or rather: who are not always careful about the weight of their extensions). The ideal is touse as few plugins as possible and avoid plugins for which you are unsure of the quality. Above all, remove all extensions that are duplicated. It is not uncommon to want to test several almost identical extensions to be able to make your choice. This is fine, but once you’ve chosen the one that’s right for you, delete all the others. Moreover, for plugins with equivalent or very similar functionalities, find out which one is the least resource intensive.
Regularly, take an inventory of all the plugins that you have downloaded (whether they are activated or deactivated) and clean up. This will prevent extensions from building up over time. Remove extensions that are not very useful, or which in any case bring less than they affect the speed of your site. Last advice: try to use multifunctional extensions , such as Yoast, which in this case allows the management of the SEO part of your site but also the creation of sitemaps.
How to determine the impact of your plugins on the loading speed of your WordPress site ? Good question ! The answer is simple: install the Pluging Performance Profiler (P3) extension , developed by Go Daddy. For once, this extension is worth it and is not a gadget. To be consistent with what we just said, remember to remove the P3 extension after your diagnosis!
3. Choose an accommodation package that meets your needs
The quality of the hosting affects the loading speed of your site. A site can very well be perfectly configured but be slow for the simple reason that the server it uses is not efficient. There are roughly three types of accommodation:
Shared hosting: you share the resources of the same server with other clients of the host. This type of hosting, the cheapest, is only viable for sites with low traffic and consuming few resources (blogs or small business showcase sites). It is enough that sites hosted on the shared server consume a lot of resources for this to slow down your own site (the host may take time to reframe sites that are too greedy). This is the eternal problem of shared accommodation …
Dedicated hosting: you rent a server from the host for yourself (it’s dedicated to you: hence the name). Dedicated hosting is best suited for high traffic ecommerce sites or blogs. This type of hosting makes it possible to manage the administration of the server, unlike shared hosting: a shared server is managed and configured by the host.
Virtual hosting (VPS): halfway between shared hosting and dedicated hosting. The principle consists in renting or buying part of a dedicated server to turn it into a virtual server administered by you.
4. Reduce the weight of images
Images consume a lot of server resources. It is often the elements of your pages that take up the most space. This is the reason why good image management is absolutely decisive for improving the speed of your site. It is clear that few webmasters take the care of optimizing images. It is a mistake. The ideal is to find the right balance between quality and weight of the image. To reduce the weight of an image, there are three solutions:
Compress the image: use TinyPNG for example to compress your PNG images and your JPEG images. This is an online solution that is free up to a certain point (paying for a certain volume of images to be compressed).
Change the format: some formats are heavier than others. Prefer JPEG to PNG for example (except for small images, icons, logos, etc.). Only use GIF for animation (so convert your GIF images to JPEG or PNG).
Reduce dimensions: the smaller the dimensions, the lighter the image.
There are many software programs to reduce the weight of images before importing into the WP library, such as GIMP for example (free open source software) or just Paint. If now you already have a sizable library of images in WordPress and you don’t have the motivation or the time to reprocess them all one by one, there is another solution. There are indeed plugins that allow you to automatically optimize your WordPress images, both those that are already uploaded to the library and those that you add. Make a backup before installing this kind of plugins, as a precaution. Here are two of the best plugins on the market:
WP Smush.it : this extension allows you to compress all the images in your library and automatically process any new image you import into WordPress. The downside of WP Smush.it is that it cannot process images over 1MB in size or those hosted on a CDN server. This is also why it is always preferable, ideally, to process your images yourself from software before importing them …
Imsanity: thanks to this extension, you can define a maximum dimension for all your images. Example: limit the maximum width of your images to 1024px. Imsanity does not act on the weight of the image, but only on its dimensions (although the two are linked of course).
5. Compress JavaSript and CSS files
A few quick definitions to get started. CSS files are style sheets. They contain all the information concerning the design of your site: the colors, the font, the structuring of the various page elements (menus, columns, etc.). They play the same role as HTML tags. JavaScript is a computer language that allows you to add dynamic and interactive elements to your site, such as slideshows, pop-up windows, dynamic menus, needle clocks, games, buttons sharing, etc. The list is potentially endless. JavaScript and CSS files are of course both essential for a website. Sadly,these files take up a lot of space and can take a long time to load . Especially since on WordPress sites, each feature has its own CSS and JS scripts. This is the reason why it is recommended to compress (we also say minify) these files. For example, you can use the CleanCSS software to compress your CSS files (adjusting the compression level as you wish). For JavaScript files, for example use JSCompress.com . Be careful, compressing these files may disrupt the display of your site. You need to do some testing to find out how far the compression is possible to avoid disaster!
There is also a WordPress plugin which allows compressing and combining both JS and CSS files. This is WP minify . Another tip: JavaScript files slow down site loading speed a lot when placed at the very top of your pages’ source code (above the waterline). Thanks to some plugins, like Footer JavaScript, it is possible to move your JavaScript scripts to the bottom of the pages (footer). Using this technique, JS files load last: items that consume few resources will load first. It is of course impossible to do the same for CSS files, because of their structuring function. Here again, you should be careful: some scripts may no longer load if they are placed at the bottom of the page
Tip: For the optimization of your CSS and JavaScript files, hire someone who is familiar with it. The optimization actions of this type of files require consequences in code, even in the case of the use of plugins. Moreover, in absolute terms it is better to work directly on the code rather than using plugins, it is always safer …
6. Use a cache plugin
The purpose of caching is to reduce the number of resources used by servers througha decrease in the number of requests. This is not to explain in detail what caching consists of. Simply, the principle consists of reducing the number of requests launched when loading a page by saving requests already sent (in a cache precisely). From a visitor’s point of view, the idea is to ensure that their browser does not have to reload all the elements of your pages each visit. Only new elements will be loaded, the others having been recorded during previous visits and transformed into static files. The more a visitor returns to your site, the more efficient the caching will be and the smoother navigation will be. On your side, caching helps reduce the amount of your server resources “pumped” by your visitors when they load the pages of your site.
Caching is often touted as one of the most effective techniques against sluggish sites. The easiest way to use a cache system on your site is to download a WordPress plugin . The two best are W3 Total Cache and WPRocket . WPRocket also offers other possibilities than caching and in particular the compression of JavaScript and CSS files. We recommend that you install WP Rocket, especially since it has the merit of being relatively easy to use. On the other hand, only downside, WP Rocket is not free, unlike W3 Total Cache.
7. Set up a CDN
Using a CDN allows your visitors to load the static content of your pages on your site (images, hidden JavaScript and CSS files) from a server located as close as possible to their connection point. The CDN allows, in other words, that the content of your site can be delivered from a maximum of servers around the planet. It should be known that the more the server which sends the pages of a site to an Internet user is located far from his connection point, the more it slows down the loading time. An Italian Internet user who loads the page of a site hosted on an Australian server will experience a longer loading time than if he connected from Sydney. CDNs solve this purely geographic problem. From a more technical point of view, the CDN you use will send the caches of your pages (your static content) to a whole network of servers dispatched on the planet. These will thus be stored on a large number of servers. The Internet user will only have to load dynamic, non-hidden content from your own server.
We recommend that you use MaxCDN or CloudFlare . This latest CDN is free, easily integrated into WordPress and has a very large network of servers (24 datacenters currently spread over all continents, except Africa). Another interesting point: CloudFlare does not hide HTML code, so your visitors will always have access to the latest versions of your text content. The cache is indeed not always suitable for content that changes quickly (article updates, etc.).
8. Limit the number of revisions of your pages
The possibility offered by WordPress natively to access the various revisions made to your pages or your articles is certainly often very useful. This allows in particular to undo certain modifications, to go back, to compare the different versions, etc. However, this possibility has the drawbacks of its advantages: all the versions of your pages are kept. Each time you update one of your articles for example, a new version is automatically generated (even if you are only correcting two or three spelling mistakes…). It is not uncommon for a page to have more than 10 versions.
It is possible to limit the number of versions or even to remove this functionality altogether . For this, you need to insert pieces of code into the wp-config.php file of your WordPress site. If you want WordPress to stop making backups of your previous page versions, you need to disable the Post Revisions feature by inserting the following code:
define (‘WP_POST_REVISIONS’, false)
If you prefer to limit the number of saved versions instead (to 5 per page for example), you will have to use this code:
define (‘WP_POST_REVISIONS’, 5);
To manage the revisions of your pages, you can also use the WP-Optimize plugin . This plugin offers many features to clean up your WordPress database (not just revisions).
9. Choose a lightweight WordPress theme
We could have addressed this point first. But if you are reading this article, you probably already have a website. The time to choose the theme has already passed for you. Better to try to improve your site using the techniques suggested above before considering the possibility of changing the theme (sometimes expensive). This last point is addressed to those who have not yet created their site, or to those who, after having carefully considered, have decided to change the theme of their site.
The choice of a WordPress theme is of course based on aesthetic and ergonomic considerations. However, ergonomic themes, packed with features and visually beautiful are not always the lightest. It is even normally the opposite (to put it mildly). However, the weight of a theme must be taken into account in the choice. The heavier a theme, the more it will tend to slow down the loading speed of your site, sometimes in considerable proportions . Here are some tips for choosing your theme:
- Choose a theme that only offers the functionality / features you need . A lot of features are actually gimmicks that only serve to weigh down your site. You need to be sure to use at least two-thirds of the features offered by the theme.
- Choose a Responsive Design theme , which allows your site to be displayed optimally on all devices, especially mobile devices. There are a lot of sites that are fast on the desktop, but very slow on the mobile. This is less and less acceptable, for several reasons.
- Don’t necessarily prefer paid themes to free themes. Paid themes even tend to be heavier on average than free themes. In any case, remember that it does not mean anything: the paid themes are not necessarily better optimized in terms of weight .
- Avoid themes that are too old , they are generally not or no longer optimized and contribute to slowing down the loading time.
- Choose a theme compatible with the most recent versions of web browsers . The majority of recent themes are compatible in this case. This advice therefore joins the previous one.
- Don’t choose a theme with too many HD images and all over the place animation. Prefer a clean and minimalist theme .
- In general and to summarize, it is a thousand times better to choose a simple theme, even if it means making it more complex later to adapt it to your needs, than a natively heavy theme that will be more difficult to “lose weight” .
Here are some techniques and tips to improve the loading speed of your WordPress site. Most of these recommendations are valid for other CMS. Some of the techniques presented in this article require a minimum of computer knowledge. If you do not have a sufficiently competent internal team in this area, this is not a drama of course but avoid fiddling too much. Instead, call on to SEO services in Lahore (agency or freelance) who will be able to clearly diagnose the problems encountered on your site and define the best actions to take to improve the loading speed of your WP site.