How to improve Joomla's performance
Performance is a critical factor to the success of your Joomla website. Especially with more and more people using mobile devices on the go. Almost half of your visitors expect a site to load in 2 seconds or less. They are likely to abandon a site that doesn’t get loaded within 3 seconds. That means page load time has a critical impact on your bottom line.
Know your tools
We have spent years perfecting the art of enterprise Joomla hosting. Our cloud hosting service is designed for the needs of high traffic and high profile Joomla websites.
The site had a load time of 3.29 seconds on average, that's not good.
Luckily there are great tools available to significant improving the load times of a website without having to touch any code. We’ll show you some of the tools and techniques we used and how it affected the performance of this website.
Move to PHP 7
Our servers run PHP 7 by default because of its impressive performance improvements. Out of the box, Joomla runs more than 2 times faster compared to PHP 5.6 and uses 40% less memory.
It makes perfect sense to move to PHP 7 as quickly as possible. We did a thorough compatibility check on the existing codebase and upgraded code where necessary to make the switch possible. Make sure to test your changes!
Setup Google's PageSpeed module
It gives you a lot of improvements without changing any source code. Out of the box it will:
- minify code by removing whitespace and comments
- recompresses and resizes images
The PageSpeed filter configuration page gives you a good idea of what is possible.
Use a CDN
A Content Delivery Network (CDN) is a system that ensures a webpage and its assets are delivered from the server which is closest to the user’s geographical location. This reduces the load time of the website no matter where the visitor is located.
Cache static pages
Using a CMS such as Joomla implies that every page request has to run through multiple processing steps before an HTML response is returned.
Most websites consist mostly out of static pages, such as news articles or product catalogs. Those can be also be cached by CloudFlare.
To do so, you need to set up a Page Rule:
- Go to your domain in CloudFlare.
- Open up the Page Rules section.
- Create a new Page Rule that matches the following pattern:
- Add the setting Cache Level and set it to Cache Everything
- Save the rule and test!
Compare the results below to see how much faster international visitors get your page content returned to them afterwards. The green bar indicates the time it took to get the actual HTML content back.
Note that you need to take special care when caching HTML pages!
You must tweak the PageSpeed filters. By default it will rewrite images to the Webp format if the browser supports it. If we are caching all pages, we might return a version that was optimized for a modern browser. If a visitor uses an old Internet Explorer version the resized images don’t show up because Webp is not supported.
Some pages can include dynamic content, like a contact page with a captcha. Make sure to add a Page Rule in CloudFlare to exclude such pages.
We’ve gained an impressive speed improvement without touching any source code. The site is now 4 times faster, loads in less than 1 second and page size is down by 16%.
Need help with the performance of your Joomla website? Get in touch, we would love to help out!