Optimizing your Joomla website for better performance

The process of optimizing your Joomla website is something that can be ongoing and quite time consuming if it is something you have not done in the past. We have put together a standard list of plugins and tips you can use to help get better performance from your Joomla website and to make it more secure.

The process which we follow at Suncoast Web Solutions when optimizing a Joomla website and improving its security has been formulated over many years of experience and one that does yield results.

Your Website Hosting

One area that a lot of websites tend to suffer website performance issues in is the actual website hosting environment that you have your website stored in. In order to achieve the best desired outcome you need to make sure you have sufficient and reliable hosting resources available to you.

Most companies in the hosting marketplace will race each other to the low price of FREE however this can adversely affect the performance of your website. If you are paying only a few dollars a month for your website hosting we recommend that you consider alternative hosting options which will include an advanced of technical support, website backups and most importantly a good amount of hosting resources.

If you have a reasonably large website you should consider a VPS (Virtual Private Server) for your website hosting needs. Shared hosting is still an option and can be great but generally speaking the cheaper the service the more sites on a server and in turn the more load placed on it causing slower load times and less resources available for your website to perform.

Optimizing Your Website Hosting Environment

While you may not be a server administrator, nor a seasoned website designer, or website developer, you can still make several helpful adjustments to your account which can help you get extra performance from your website.

Joomla includes a default .htaccess file which you should enable once you have completed the installation on your hosting environment. To do this simply rename the htaccess.txt to .htaccess through File Manager in CPanel or through your ftp client. While this is a great generic option it doesn’t cater for extra security and basic optimization commands which can help improve site security and site performance.

The htaccess.txt file which we have attached a link to further down has a few improvements which can help increase your sites performance and give your site a little bit more security.

Each change/addition we have made to the default .htaccess file are at the bottom of the file. The “Basic Performance Boosters” and “Tightened Security” items are commented out with # at the start to ensure that you do not make a change that will automatically cause ‘internal server errors’ to appear on your website when you upload the updated htaccess file to your site.

Some hosting providers servers are configured to not accept PHP Values or PHP Flags in their customers .htaccess files. Rather they have to be put in to a php.ini file. So when taking out a # at the start of each line that has “php_value” or “php_flag” on it you should do a quick save and refresh on your website to ensure it hasn’t caused any issues.

If it does cause an issue simply add the # back to the start of the line and save the change to ensure that your site comes back online. If it does generate an error and you are not sure how to continue, you should contact your hosting provider to find out how these settings can be implemented safely.

There is only one real change you will need to implement in this file yourself that we cannot do. That is the line that has the “php_value session.save_path” on it. Where “username” or “domainname” appears simply replace it with the respective value. For CPanel hosting accounts you change “username” to your cpanel username. For Plesk hosting accounts you need to change “domainname” to yourdomainname.com.au

The remaining changes in the first section are designed to tell the server to give your account and site users more resources for scripts to execute and for larger files to be uploaded.

The ‘tightened security’ options list some functions you should disable in your domain to prevent unauthorized changes or execution of malicious scripts using common commands and techniques employed by most script kiddies attempting to deface websites. These are optional but are strongly recommended.

The next lot of changes in our file that you will see is all related to leveraging your browser cache and other site performance improvements on Apache based hosting servers. These are found documented in various locations around the internet, including some of the google’s developer api and PageInsights reference libraries and Apache’s official documentation sections.

Download our modified .htaccess file for your Joomla Website.

Themes

There are many great Joomla Template Clubs out there in the marketplace, some are long term players with their own frameworks, extensions and other cool addons. Keep in mind that they can “bloat” their templates to allow huge amounts of customizations. This does also mean that there can be a lot of requests to both local and external resources, which will add to the sites load time. If, and where at all possible, turn off or uninstall any of the additional extensions you get with your theme that you are not using.

If you can get a custom coded template created for your website that is generally a better way to go for many reasons but performance is a part of that list. It can also give you the opportunity to have any unwanted addons and external scripts taken out of the theme without losing the aesthetics that your site visitors will enjoy.

To help with performance, if you are custom coding your template you should load all of the javascripts you can from the bottom of the page or make sure that the have either “async” or “defer" tags included in your <script> tags.

Components, Plugins, Modules

While there is huge community support and contribution to the Joomla project there is also a lot of components, plugins and modules that call scripts from external locations. Each request for access to scripts from external locations can cause site load time issues.

Sticking with popular extension developers will help keep the requests to a minimum as most will develop their products around lightweight Javascripts, Bootstrap, JQuery and other popular open source technologies. It also means that as a rule of thumb they will either include required libraries with their product or reference to popular and fast cdn which will help with your site performance.

JCH Optimize Pro (Plugin) – This extension is well worth a mention and will help with optimizing and compressing CSS and Javascript files respectively. It will also help minify your html files and provides CDN Support so that you can distribute your content across a CDN (Content Delivery Network) to ensure faster loading and less strain on your hosting server. The plugin also will help optimize your websites images.

There are quite a few site performance improvement extensions available but JCH Optimize Pro is by far one of the best options in the market place.

A few popular and well supported component, plugin, module and theme developers include:

For Joomla Site Performance specific extensions visit https://extensions.joomla.org/category/core-enhancements/performance/

Global Configuration

In Joomla one of the most important areas you need to visit for your sites optimization is going to be the Global Configuration area. This area contains a lot of basic core settings that can help with Joomla site performance.

Under the System tab you should enable caching. Typically we choose “ON – Progressive caching”, and then choose a suitable Cache Handler. By default it is set to “File” but you can use one of the server supported options that may appear in the drop down list. They all have their Pro’s and Con’s but ultimately just turning on caching can help.

Finally you have the “Cache Time” which is a time limit on how long the cache file will be stored before it is refreshed. Default we set is usually 150 minutes.

Under the “Server” tab you should turn on GZip Page Compression. This will force each and every page to run through the servers GZip Compression module if the server offers support for GZip compression. These days most do by default but some hosts turn it off due to the performance overheads it can cause on heavily populated servers.

Image Optimization

This one has been partially covered earlier but it is important that you consider sourcing image compression from external tools which are not platform or CMS specific as they can provide better results and help increase load times significantly.

A great solution in the marketplace include TinyJPG and TinyPNG which compresses images very well. We have seen some results where reduction in image size has been over 75% even after we have done what we can to shrink the images in graphic design tools that we utilize.

Google PageSpeed Insights will also provide free image compression of your images if it says your site has images that could be compressed further. While it is quite good and often doesn’t drop the image quality it can have its hits and misses.

Some Good Practices With Joomla Based Websites

  1. By far one of the biggest pitfalls and issues that plague Joomla websites that we see often is people often leave plugins, modules, components and themes they have installed but not using still installed. If you are not using the plugin, module, component or theme, then you should remove it. This will help with both security and performance as some items will load regardless of whether they are being used or not.
  2. Before installing a plugin, component or module make sure it has a good rating and ongoing support. Read the reviews and most importantly make sure that there has been regular releases and updates posted so that you can ensure ongoing support.We have listed below some great companies who have been long term players in the Joomla space who provide great ongoing support and good quality products.
  3. Use the Joomla Template Override System as much as possible. Do not modify, add or remove any Joomla core code that is in the default installation. This will not only be time consuming but more importantly when an update is released for any plugin, component or module the updates will not override the customizations you have made.
  4. Do not custom code plugins, modules or components that add multiple database requests (locally or externally) or require huge amounts of queries to be processed in one go, break the process down in to smaller chunks and if need be run them separately to the Joomla installation.
  5. Keep your Joomla installation and its third party extensions up to date! This one is a big one, Joomla will release updates quarterly but usually there is a stack of improvements, bug fixes and performance updates as well.

Conclusion

The list of things that you can do to out of the box to optimize your Joomla website performance is quite small however if you build your website with page size in mind, keep your images small and use CSS where possible in place of images you can get great improvements.

If you have followed the guidelines above and have no success contact us today and one of our Joomla Specialists will be able to discuss how we can improve the websites performance in more detail.

Please note: Before we continue it is up to you to make a backup of your website before carrying out any changes outlined below.


WE ARE YOUR ONE-STOP INTERNET MARKETING SOLUTION ON THE SUNSHINE COAST!

GET IN TOUCH WITH US!

    A Word From Our Customers