A Non-Developer's Guide to Supercharging Your Joomla Site
by John Hooley
Who This Guide Is for
This guide is for you, the non-developer that needs techniques that will speed up your Joomla site without 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.
- Why is Joomla slow?
- Techniques to Get Your Joomla Speed Up
- Gzip compression (Page weight improvement)
- Caching (Application optimization)
- Optimize images (Page weight improvement)
- Extension cleanup (Page weight & too many resources improvement)
- Combine and minify page resources (Too many resources improvement)
- Change hosts or servers (Slow server improvement)
- Check for security vulnerabilities (Application fix)
Why is Joomla slow?
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.
Large Page Weight
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 & 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 and 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.
Too Many Requests
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 hosting environment, 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 hosts to over stuff their servers in order to get more revenue. 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 under an excessive burden.
Joomla Speed Test
In order to determine whether changes are effective, we need to have a benchmarking tool such as GT Metrix; it measures how fast your site is currently loading. It's a good tool to determine not only the time it takes to load your website, but also to highlight what is making it so slow. It's also worth running your website through Google's page insight tool. This tool can tell you whether you are on a slow server.
GT Metrix scores: Load Speed, Page Weight, Number of Requests
- Where should your page load time be? Your site should load in under 3 seconds. The ideal range is 1 seconds to 2 seconds. There are sites that load faster than a second, but anything under 2 seconds is very strong performance.
- What should your page weight be?There is no specific number, but ideally it shouldn't be in megabytes, but in kilobytes. (1,000 KB = 1 MB), 300 KB is good. 3 MB is bad.
- How many requests should the webpage be making? There is no fixed number for this either, but lower is better. Anything over 50 requests is worth trying to bring down.
Techniques to Get Your Joomla Speed Up
Okay, now that we've laid a foundation, let's take a look at a few techniques to supercharge your site. The examples below are on Joomla 3, but they will work just as well for Joomla 2.5, etc.
Gzip Compression (page weight)
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, Go to 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 (application optimization)
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, punch 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 you had a piece of paper and pencil to write down answers. 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.
In your Joomla site 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
Optimize Images (page weight)
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 site, you want to:
- Open it in an image editor like Photoshop or Gimp.
- Resize it to the needed size. You should be able to determine this by eye, simply view the image at 100% resolution instead of 10% or 30% (what an image viewer will often do for extremely large images.)
- Save it for the web. This is an application feature which will compress the image while maintaining most of its resolution. If your image editor doesn't have this feature, there are online services that can do this for you (imageoptimizer.net, compressnow.com, and more.)
Extension cleanup (page weight & too many requests)
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:
- Start with a backup. Load up your extension manager.
- Search through your plug-ins, modules, and components for items that you are not using and enabled.
- Pay particular attention to system and content plug-ins. Disable anything not in use.
- If the site continues to work normally, uninstall un-needed and unused extensions. However, do not uninstall Joomla core extensions or anything that you are not 100% confident that you know what it does and that you don't need it.
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.
Use JCH Optimize to combine and minify (too many requests)
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 minifying files can be tricky, however there is a well-regarded plug-in that makes this easy to do for non-developers. It's called: "JCH Optimize". You can download it here:
Change Hosts or Servers (slow server)
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
- 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. PageSpeed Insights can also tell you whether your server is slow.
Check for Security Vulnerabilities (application fix)
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 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 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.
Sharing is Caring :)
If you found this guide helpful or informative please share it using your favorite social network so that other people can benefit.