Why and how to speed up Joomla website?
Speed up Joomla wasn't an important topic many years ago as for years page load time was only a very incidental criterion when designing a website. But that was before. Nowadays, speed up Joomla is a top priority for every website owner and this article is dedicaced to help them.
On the 17th January 2018, Google has announced that site loading speed will become a benchmark for mobile indexing as of June 2018.
The "Speed Update," as we're calling it, will only affect pages that deliver the slowest experience to users and will only affect a small percentage of queries. It applies the same standard to all pages, regardless of the technology used to build the page. The intent of the search query is still a very strong signal, so a slow page may still rank highly if it has great, relevant content.
Zhiheng Wang and Doantam Phan
Since the deployments of AMP (from February 2016) and Mobile First (since November 2016), we see very clearly that Google seeks to prioritize indexing on mobile and that its objective is to speed up the display of web pages on mobile phones.
Even if we do not necessarily agree with everything that Google does and says, we have to admit that it is painful - to put it mildly - to wait several seconds in front of a web page that is in the process of being to charge. It is even estimated that beyond 5 seconds, the vast majority of Internet users (and mobile users) will certainly have already closed the tab.
Moreover, the concept of eco-web design is no longer science fiction. The Web industry is not exempt from criticism in terms of carbon impact and it is starting to take the measure of its responsibility. Today, it is more and more urgent and important to integrate a real environmentally friendly approach from the design phase of a website, but also during the entire production phase of it.
You may not have a reception concern because you are in an area with good coverage, but others may not be so lucky. So to no longer put this wait on your visitors, I suggest you see together how to measure the speed and display time of your website and then see what are the points to check so that your Joomla site is (again) faster.
How do I measure the display speed of my Joomla site?
For this, there are (very) many free tools that measure this speed and it is not possible to list them all here. The advantage is that these tools also give you tips and advice to correct anything that slows down your site. By testing your site, you will have a first mark and you will be able to see the positive evolution of this speed thanks to your efforts. However and in order to be consistent, I advise you to use the same tool throughout your tests.
To begin with, we must take a first measurement of the display speed of our site. Do not worry if this first score is not perfect (few sites are ideally optimized) because all that matters here is all the work that will be done afterwards to effectively and sustainably improve the loading time. Among the most recommended tools in this area, here are the ones you can choose:
The results delivered by these tools are all reliable and if their results may differ somewhat from each other, you will undoubtedly have the same recommendations to follow to improve your score. Note this score, apply the fixes that are indicated and re-test your site with the same tool. Start over and over again.
Remember that a website's display speed is just one criterion among many to get it referenced by search engines. Also, do not be more royalist than the king. A perfect score is indeed possible but that will not ensure you to be shown on the first page of Google. My advice is to get as close as possible to the 90s and above all, to stay there.
Search engine criteria for getting a website change, technologies change, tools change, and your website content changes. This means that all the improvement and optimization work that you have done here will have to be checked and probably redone in a few weeks / months.
Test carried out on January 16, 2021 - Desktop view
How do I improve the speed of my Joomla powered site?
We will now see what are the best practices to implement so that your Joomla site runs faster!
To be effective over time, this series of recommendations must become a sort of lifestyle. Also, I cannot advise you enough to keep these tips in mind and if your memory is crumbly, add this article to your favorites so that you can consult it as often as necessary.
Always remember that it is your responsibility to provide the best user experience for internet users and if you don't, they will likely go to other websites.
Speed up Joomla with a high quality hoster
It is REALLY the first thing to look for when looking to optimize the speed and performance of a website. A constant often encountered with slow loading Joomla sites is a poor quality host.
Is your website host on a shared server? In this case, you are sharing the server with hundreds of other websites.
Where is the server hosting your Joomla site located? Is it located in Europe and all your visitors are north americans?
Is one of the sites sharing your shared server consuming all the bandwidth?
Is a low-cost web hoster a real savings if your site takes 10 seconds to appear?
These are all questions you need to ask yourself before deciding which partner to trust your website with. Do not wait until you have heavy traffic to change server and host because you will never be able to have a satisfactory display speed with low quality hosting.
Spped up Joomla by optimizing your images
One of the first things to do is make sure that your images are properly optimized for the web. Avoid using images that are too large as they will have a slow and long loading time.
The format of your images is also an essential criterion to very significantly reduce the loading time of your pages. Today, we should focus on vector files of type SVG and images in webP format using an extension like DJ-WebP.
Speed up Joomla with Gzip compression
In the global configuration of Joomla, you will find a setting called Gzip Compression. If this is not activated, do so and save your change. This will allow all css and html code to be compressed on the server and a much smaller data packet will be sent to your computer and then decompressed by the browser. It may seem like a lot of work, but it will speed up the loading of pages very significantly.
Note that some hosts activate this setting by default on their servers. If activating this parameter in Joomla breaks your site, there is a good chance that this compression is already activated by your host (eh no, it is not possible to perform several compressions with gzip).
To check if this compression is enabled on your server and / or by Joomla, you can test your Joomla website on giftofspeed.
Spped up Joomla with the cache
Caching can be enabled from the global configuration of Joomla. The cache takes frequently viewed content (articles, images, modules, etc.) and stores them so that they can be re-displayed more quickly. The advantage is that your pages load faster. Conversely, your content may not always be up to date. For the majority of sites, this is not a problem, unless you change the content of your articles every 30 minutes (if this was the case, you probably have other problems outside of the part of this article)
Only enable this setting when your site is complete and ready to go into production. If you activate it during the construction phase of your site, you will wonder why your changes to the pages are not taking effect and it will drive you crazy!
Speed up Joomla avoiding weighing down your site
Joomla allows you to install an infinite number of extensions in seconds. The problem is that some of these extensions may have been developed by people who may not share the same qualitative coding practices as the Joomla team. A component can use jQuery 1.0 with a size of 19 kb, a gallery can use jQuery 1.5, but uncompressed so it is 208 kb, your forum can use the MooTools library (but not Joomla's) and it's still 180 kb which are added. Before you know it, you have several different types of frameworks loaded at every page load. This is a huge resource overload that will likely bring your server to its knees and increase your page load times.
Cleaning is also important when it comes to websites: have you emptied all the bins (articles, menus, categories, modules, etc.) on your Joomla site? If you no longer use certain extensions, what's the point of keeping them on your website? Ditto for any registered users. In short, you have to make sure that your Joomla website is always clean very regularly. Besides performance issues, it could also save you from security concerns.
Installing a very large component to use only one of its features is a total aberration which will unnecessarily weigh down your site and penalize the user experience of your visitors. In the vast majority of cases, you can do without page builders and building tools such as CCKs. Indeed, most of the time, you can obtain the same result thanks to the native functions of Joomla (custom fields, overrides, etc.). In addition, you will not have any additional maintenance to do and probably no license to pay either!
Files of some components can represent up to 30% of a blank Joomla website!
Speed up Joomla with the .htaccess file
.htaccess file is a file that is used on Apache web servers to configure server software. This is done so that the server behaves in a particular way to enable or disable certain functions. There are many uses for this file, such as URL forwarding, URL rewriting, protecting sensitive parts of a website, or even blocking specific IP addresses.
I suggest three actions to be implemented via this file to improve the performance of your site.
- Enable browser caching
When a browser displays a page, it must load several elements that change very rarely, such as certain style sheets or the logo, for example. By setting expiration headers for files on your site, you are effectively telling the browser to save them locally on the user's computer. This means that the next time the user visits the site, less data will need to be downloaded.
- Enable Keep Alive
Enabling Keep Alive is essentially a way for the web server to tell the browser that it does not need to make a separate request for each file that it retrieves from a site. This reduces the brief latency following a resource request and its download to the browser. Check here with the host before adding the code below, as in many cases this could have been added by default on the server.
<IfModule mod_headers.c> Header set Connection keep-alive </IfModule>
- Deny access to Spam Bots
Sometimes a page's load speed can be reduced by the bandwidth you have on your hosting plan. This can be further reduced if your site is hosted on a shared server. The last thing you need is for spambots to take even more bandwidth when crawling your site no matter what the reason they were created (usually to mess up your analytics data)! There are two ways to prevent them from doing this; one is to block them and the other is to redirect them, although that in itself can slow down the loading of the site.
<IfModule mod_setenvif.c> # Set spammers referrals as spambot SetEnvifNoCase Referer spambot1.com spambot=yes SetEnvifNoCase Referer spambot2.com spambot=yes SetEnvifNoCase Referer spambot3.com spambot=yes ## Ajoutez autant de lignes pour chaque spambot Order allow,deny Allow from all Deny from env=spambot </IfModule>
By following these few common sense tips, Google could potentially improve your site's ranking, your visitors will have a much better user experience, and your Joomla site will have less of an impact on the environment. Three more than enough reasons to implement them now.
And you, what practices have you put in place to improve the speed of your Joomla site? Please feel free to share your experience in the comments, I look forward to hearing from you.