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!
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?
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!
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
will be are removed from PHP in the near future.
The specified MySQL interface is defined in
public $dbtype = 'mysql';
Change this to
public $dbtype = 'mysqli';
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:
This, of course, is a performance drain.
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
public $session_handler = 'database';
public $session_handler = 'none';
Of course there’s Redis and Memcached as well to store your Joomla sessions.
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.
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.
Use caching in Joomla!
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, at least use Cache_Lite as cache handler: in your
$caching to 1 (enabled, conservative), or 2 for progressive caching.
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 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.
Enable gzip in Joomla, 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.
configuration.php file, locate
public $gzip = '0';
$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.
To Disable Gzip go to System > Global Configuration > Server, set to No, and then Save.
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:
- 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
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.
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.
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
PS: : If you’re not running Joomla 3.6.5, at the time of this writing, then stop using Joomla entirely!
- Joomla! (< 3.6.4) Account Creation/Elevated Privileges write-up and exploit
- Joomla 3.6.5 Security release
Then why not buy me a coffee? A small donation of just $5 (or more 😉 ) helps out a lot in the development, research and hosting of this blog.
Thank you for your support.