by John Hooley
This guide is for you, the non-developer that needs techniques that will carve seconds off your site load time but that don't require years of experience as a developer to implement safely. We will explore how to determine what are the main causes of slowness and specific techniques to address those causes. Additionally, we will point out low hanging fruit where you can make changes that are easy but that will add horsepower to your site.
Here are the following most common reasons that Joomla is slow: Your page weight is too large. Your page loads too many different resources. Your server is slow. I'm sure you're ready to just start trying things to speed up your site, but if you understand the above factors, it can help you to narrow down your efforts into what will be most effective. Below, I'll briefly explain what each is and how it impacts your speed.
Page weight is the total size of the resources delivered from the server to a visitors web browser. Just like people, webpages have all kinds of different weights. If you imagine that your Web server is a horse and cart and it has to travel from one point to another to deliver a webpage, you can get an idea of how weight slows things down. A page with very little weight the horse doesn't even feel as it pulls. A very heavy site causes the horse to strain slowly from one point to the next. Some webpages are like having an entire football team jammed into one cart with one tiny pony trying to drag it to the visitor's computer.
There is no specific number, but ideally it shouldn't be in megabytes, but in kilobytes. (1,000 KB = 1 MB) 150 KB is good. 1.5 MB is bad.
Most websites are on shared hosting. Think of this like a virtual apartment building. Just like a real apartment building uses electricity, water, and sewage pipes to manage resources, a shared host distributes a computer server's ram and CPU time to all the sites on that shared server. How does this impact speed? In a real apartment building there is a real constraint on how many people can be in that building. However, in a shared host, the limit is much higher and tenants, in this case your website, have no idea how many other sites are sharing the server's ram and processor. Because of this, it's common for shared host to over pack their servers in order to get more revenue for each server. This causes slowness because instead of 50 sites sharing a server, 200 do so. In a real apartment building if you packed four times the apartments into it people wouldn't be able to wash the dishes because there wouldn't be enough water available to provide pressure. On a Web server, it causes slowness as the server tries to serve each site.
In order to determine whether changes are effective, we need to have a benchmark – a measure of where your site currently is loading. A good tool to determine not only the time it takes to load your website, but also to highlight what is making it slow is GT Metrix. Where Should Your Site Be? Your site should load in under 3 seconds. The ideal range is 1 seconds to 2 seconds. There are sites that loading faster than a second, but anything under 2 seconds is very strong performance.
Okay, now that we've laid a foundation, let's take a look at a few techniques to supercharge your site.
Gzip compression is a server technology which takes your normal site content and compresses it before sending it over the wire to a visitor's web browser. Imagine two wheel barrows in a 100 meter race. In one wheel barrow, is a stack of pizzas. In the other is a recipe to make pizzas. The one with the recipe will win the race because it's lighter. This is the same way compression works – the visitors web browser can use the recipe to re-create the same "pizzas" as if they had been delivered the whole distance.
To enable gzip compression, in your Joomla! site's backend, in the global configuration, under the server tab there is a heading, "Server Settings." Beneath that heading is a switch to turn on gzip compression. All you need to do is enable it and then save. Once you have saved the setting, navigate to the following page to test whether it is working: http://www.whatsmyip.org/http-compression-test
If it's not working, your web host may not have the correct Apache server modules installed and the next step would be to follow up with them about enabling gzip compression for your server (most web hosts should have it enabled and installed.)
Caching is a technique your Joomla site uses to save itself brainpower. Pretend that someone was asking you math questions. Every time they ask you a question, you whip out your calculator, bunch in the numbers and then tell them the results. The funny thing is that they keep asking you the same math questions every four or five questions. This is how your server works without caching enabled. Now imagine that's you had a piece of paper and pencil to write down answers and instead of calculating them every time, whenever you hear a repeat question you just check your paper and tell them the answer. That's how your web server works with caching enabled- it temporarily stores parts of your site in memory so that it doesn't have to build them when someone asks for them. Periodically, it will check to make sure that nothing is changed and update its internal cache. Enabling caching is as easy as an enabling gzip compression.
In your Joomla! sites backend, and global configuration, under the system tab, there is a heading "Cache Settings." All you need to do is enable either progressive or conservative caching. Because of how caching works, it can impact the correct function of your website for more complex tasks (beyond the normal content pages.) Because of this, I recommend that you try conservative caching. If you're willing to go through and test the various functions of your site, progressive caching does have more of a performance boost
A common error that people make is to upload full-size or uncompressed images to their site. Images are measured in pixels, tiny squares of solid color that combine to present an image when viewed as a whole. Most websites use images in their content that doesn't need to be larger than 600 pixels wide. However, phones and cameras will take pictures that are several thousands of pixels wide and users will upload them unaltered. Joomla! will allow them to be resized for display, but the image will still be delivered at its full size to the browser for rendering. This impacts page weight by delivering images that are extremely heavy instead of a smaller image that looks the same in the end. An unoptimized image that has been resized by the browser to fit a webpage is often 3 to 5 MB by itself – several times the rest of the resources loaded by the page as a whole.
To optimize an image, prior to uploading on your website, you want to:
Joomla is extensible and you can install components, modules, and plug-ins which helps you to make your site do all sort of interesting things. However, you can take this too far, and people often do, by installing tons of extensions and actually benefiting from only a few of them. Most extensions require separate resources to load correctly and add to the page weight and the number of resources to load. In particular, system and content plug-ins that are enabled will load every time a page loads and if they're not doing anything they will slow down the server and your pages load speeds. Additionally, un-used extensions that are left on a site often cause security vulnerabilities by not being updated actively (out of sight, out of mind.)
To fix this:
Important!!! Do not uninstall Joomla core extensions or anything that you are not 100% confident that you know what it does and you don't need it. You can tell that an extension is a core extension because it will be created by the Joomla team.
As I explained in the too many resources section above, the sheer number of resources causes slowness by having the visitor's browser go back and forth with the server. One way to improve this is to combine several like resources into one larger resource to send from the server to the browser. This doesn't affect page weight because the weight is the total of all the parts, but it does decrease the number of requests that have to be made to the server and can have a significant impact on speed.
"Minify" refers to the compression of a resource by removing things like spaces and long names that Joomla developers need to understand it but computers do not. For example, a CSS file might have a reference to a title element on the page called ".titlebar" but to a computer it makes no difference what it is called and the CSS file can be minified by changing ".titlebar" to ".tb".
Combining resources and minify files can be tricky, however there is a well-regarded plug-in that makes this easy to do for nondevelopers. It's called: "JCH Optimize". You can download it here and here's a link to the documentation on how to use it.
Sometimes the most dramatic improvement you can make is by simply changing to a different server or a different web host. We've seen sites get very slow on the following web hosts: Dream Host, Go Daddy, 1 and 1, and Blue Host. If you have made other improvements and still see slowness it may be worth considering switching to a different host. In particular, if the backend of your Joomla! site seems to load slowly from area to area this is a good indicator that the server is slow and not other areas of the site.
Finally, it's worth mentioning that a hacked site will often load slower than it otherwise would if it were healthy and secure. This can be for variety of reasons all of which are bad for you and your visitors. There are several tools available to scan your website for hacked files and a few online services. Below is a link to the Joomla extension directory with a search for file scanner. Most scanners cannot say with certainty whether a file has been hacked, so if you have a strong sense that's this is the case it is worth hiring a developer to take a look at.
These techniques are within the ability of most non-developer users and will significantly help increase the speed of your website if you are suffering from the common slowness causes. However, there are several more techniques which help to further increase speed but that typically require a developer to execute safely. These include things like using a CDN, hosting on a high-performance cloud server, tweaking your .htaccess file, using sprites in your template, and hand optimizing the template and extensions in use.
If you found this guide helpful or informative please share it using your favorite social network so that other people can benefit.
Sign up below to receive Joomla site management tips and tricks as well as early access to content guides like this one.
Web Fonts enables site owners to use commercial and GPL non-web-safe fonts on their Joomla sites.
cclay, JED Review
"All I can say is, "wow"! I can't believe (a) how powerful Web Fonts is, and (b) how easy it is to use. I've had a few clients lately ask about using non-standard fonts, and today I was determined to find a solution. Within minutes, I was experimenting with free Google web fonts using this component. I'll be using it on many future sites... Highly recommended!"
Mail In Vote is a Joomla! component that allows site owners to find out what their users are thinking by emailing them polls.
Marni Derr, JED Review
"This handy extension is an excellent and more robust way to collect user data. I run multiple Joomla web sites with very different audiences, this extension helps me collect data from my users quickly and efficiently... Easy to install and easy to use. I will now be recommending this extension to a multitude of my corporate clients."
Portfolio Zen turns categories and articles into an easy to manage portfolio.
michael729, JED Review
"I'd been looking for a way to layout a group of images in a Yearbook kind of style. I stumbled across this extension and liked its look. Once installed (simple), I looked at the second option for the Kite layout. Loved it, using it, and will us it again."