Sysadmins of the North
Share now!





Joomla logo

8 Tips to improve Joomla performance

How to speed-up Joomla performance on Windows Server IIS: 8 important, but simple, tips to improve & speed up Joomla Add caching, gzip compression, set your sessions & optimize MySQL database functions… Provide your visitors with a blazing fast Joomla website!

Joomla logo
Joomla Logo

Website optimization

For WordPress, a lot of posts are available to optimize WordPress performance. Drupal’s performance can be improved with the BOOST module, and there’s PHP optimization -Dutch article- in general. But what about Joomla? Read on, how we optimize and improve Joomla’s performance and loading speed easily.

Here are eight (8) tips for you!

But wait. Are you running Joomla 3.5.6? Or an older version?

Improve Joomla’s performance with these 8 tips!

Speed-up Joomla with just a few config settings.

All Joomla changes and optimizations can be made through the administrator back-end, located at the /administrator URL, or by downloading and editing the configuration.php file. Don’t know how to download and edit the configuration.php file? Have a look at my Dutch article on how to edit files through FTP (Google Translate the article, or just look at the screenshots).

Let’s start tuning Joomla

Joomla MySQL database functions

Current versions of Joomla can operate on MySQL, SQL Server and PostgreSQL database back-ends. For MySQL there are two interface choices: “MySQL” and “MySQLi“. Nowadays every Joomla version supports the MySQLi database functions, so we want to use that.

The i in MySQLi stands for improved and is the recommended MySQL interface to use, and offers better performance.

We all know the old ext/mysql functions will be are removed from PHP in the near future.

Update: ext/mysql is already removed since PHP 7.

The specified MySQL interface is defined in configuration.php:

public $dbtype = 'mysql';

Change this to mysqli:

public $dbtype = 'mysqli';

Joomla Session handler

Optimize Joomla’s session handler. By default, Joomla stores all session information in its MySQL database. This is ideal if both the MySQL database and Joomla website are on the same physical server. When it’s not, this generates a lot of unnecessary traffic between the database and website, just to verify a session. For every visit. See the chart:

Joomla ACL decision flow-chart
Joomla ACL decision flow-chart

This, of course, is a performance drain.

This may interest you:   Project Honey Pot

Therefore, it’s recommended to store Joomla session information on the web server’s file system. This provides faster access to its session files and information. Especially on SSD’s.

How and where sessions are stored is defined by the Session Handler: $session_handler. When the session handler is set to 'database', change it to 'none':

public $session_handler = 'database';
public $session_handler = 'none';

Of course there’s Redis and Memcached as well to store your Joomla sessions.

Remove unused Components, Plugins, Modules, and Templates

Over time a lot of components, plugins and modules are installed, tested, and disabled on your website. This probably, goes for templates as well. When a request to your website is made and the PHP process starts up, it indexes all files in your website. Even those files of disabled components, plugins, modules and templates, simply because they are on the file system.

Going through the file system and indexing those unnecessary files takes up a lot of additional time (relatively), it’s best to simply remove (delete by FTP) all unneeded files and directories.

Convert your Joomla MyISAM database tables to InnoDB

When you run Joomla on your website for a longer period of time now, chances are your database tables are still using the older and less performing MyISAM storage engine. It is wise to update and convert these tables to InnoDB.

The main reason is that InnoDB is actively developed and MyISAM is not. InnoDB tables provide better performance than old and deprecated MyISAM tables.

Set up a Joomla caching handler with WinCache, Cache_Lite or File

Use caching in Joomla

Joomla Cache Settings where you can choose Cache_Lite
Joomla Cache Settings

If your web hosting provider has WinCache available on the web server, then this will give a great performance boost for your website. If WinCache is not available, use Cache_Lite or File as cache handler. Open up your configuration.php file, and set $caching to 1 (enabled, conservative), or 2 for progressive caching.

This may interest you:   The PHP Benchmark

Set Joomla’s $cache_handler to File or cachelite:

public $caching = '1';
public $cache_handler = 'File';
 // public $cache_handler = 'cachelite';
 // or 'wincache' if available

Don’t forget to make sure your cache\ folder is writable.

WinCache for Joomla 1.5?

WinCache as cache backend is not supported on Joomla 1.5. You shouldn’t be using an ancient version like Joomla 1.5 anymore! See Joomla’s CMS versions for more information.

Anyway, if you’d like to add WinCache support for Joomla 1.5, grab Don Raman’s wincache.php cache storage file from the blog post performance improvement in Joomla using WINCACHE user cache, and place the file in libraries\joomla\cache\storage. Now you can configure $cache_handler to utilize WinCache.

Joomla Gzip compression

Enable gzip in Joomla, because really: you don’t want to have gzip disabled!

Gzip compression compresses the response body sent from the web server to the browser. A smaller file is downloaded faster, making visitors happy, and a happy visitor is a returning visitor. Gzip compression in Joomla! is also known as buffered output.

In your configuration.php file, locate

public $gzip = '0';

and set $gzip to 1, to enable gzip compression in Joomla

public $gzip = '1';

Let me repeat: Enable Joomla Gzip compression is one of the things you must do to make your website load faster. To Enable Gzip go to System > Global Configuration > Server – where you’ll find an option Gzip Page Compression. Simply click Yes and Save.

how to enable gzip compression in Joomla through the Server Settings screen
enable Gzip compression in Joomla

To Disable Gzip go to System > Global Configuration > Server, set to No, and then Save.

Joomla optimization extensions

There are many extensions that try to improve the performance of your Joomla website. Like the earlier mentioned WinCache. Here are a few that I can recommend:

  • JCH Optimize – Combines JavaScript & CSS, combines images into sprites, minifies and compresses JavaScript, JCH Optimize helpts to minimize expensive http requests.
  • Jbetolo – All the functionality that JCH Optimize has plus CDN support, jbetolo primarily helps you with your front-end optimization,
  • JotCache – Improves the built-in Joomla caching system, JotCache is advanced solution for page caching in Joomla
  • Cache Cleaner – With Cache Cleaner you can clean your cache fast and easily via a link in your Joomla Administrator
This may interest you:   Joomla websites abused as open proxy for Denial-of-Service attacks

Bonus Tips: run an as high as possible Joomla version

Every new Joomla version comes with new optimized PHP code, functions and settings. Use them! Always run an as high as possible Joomla version to make use of these improvements.

Optimze and lossless compress images, minify JavaScript & CSS
Make sure your images are optimized for the web properly. Optimize and lossless compress images and minify JavaScript and CSS files is very easy to do. It drastically downsizes your website size (footprint), and making it load faster.

And further, curious how I optimized my web hosting? Learn how to do the same

Let’s be honest, PHP is PHP, so whether you use Joomla as your CMS or Drupal or WordPress, most performance is gained through your PHP hosting environment. And MySQL, do not forget about your MySQL database server!

So read how I optimized my web hosting environment, and start doing the same.

Protip: Learn how to optimize PHP on your website or IIS web server? Or just to improve OPcache settings.

Conclusion

Out-of-the-box, Joomla is not very optimized for performance. With just a few basic tweaks and settings, we’ve optimized Joomla performance extensively. Page loads are much faster. All changes can be made through the administrator back-end, or by downloading and editing the configuration.php file.

PS: 22-12-2016: If you’re not running Joomla 3.6.5, at the time of this writing, then stop using Joomla entirely!


buy me a coffee
Buy Me A Coffee

About the Author Jan Reilink

My name is Jan. I am not a hacker, coder, developer, programmer or guru. I am merely a system administrator, doing my daily thing at Vevida in the Netherlands. With over 15 years of experience, my specialties include Windows Server, IIS, Linux (CentOS, Debian), security, PHP, WordPress, websites & optimization. Want to support me and donate? Use this link: https://paypal.me/jreilink.

follow me on:


Thank you!

Leave a Comment:

5 comments
Add Your Reply
Skip to content OaXSu TYyjXAUfryC XwrFsvCtoZy