By Yann Gomiero on Saturday, 19 April 2025
Category: April

Boosting Joomla with LiteSpeed Cache and Redis

Combining Joomla with LiteSpeed and Redis is a great way to make your website faster, more responsive, and better equipped to handle high traffic. This setup relies on modern caching and acceleration technologies, while remaining compatible with a wide range of hosting environments.

Before choosing a hosting provider, make sure that LiteSpeed (preferably the Enterprise version) and Redis are available, and that the server meets Joomla’s technical requirements.

LiteSpeed: A high-performance web server

LiteSpeed Web Server is fully compatible with Apache (including support for .htaccess) but offers much better performance. Key features include:

LiteSpeed is available in two editions:

The LiteSpeed Cache Plugin for Joomla

The official "LiteSpeed Cache for Joomla" plugin makes it easy to integrate LiteSpeed’s caching features. It offers:

Replacing Joomla’s file cache with Redis

By default, Joomla uses a file-based cache stored in the /cache directory. When Redis is set as the cache handler, those files are no longer used. Cached data is instead stored in memory, greatly improving performance.

To configure it, go to the Joomla Global Configuration, tab "System" → "Cache Settings":

Or set it directly in your configuration.php file:

public $caching = '2';
public $cache_handler = 'redis';
public $redis_server_host = '127.0.0.1';
public $redis_server_port = '6379';
public $redis_server_auth = '';

Conservative or Progressive caching: Which one?

The choice between Conservative and Progressive caching depends on the type of content your site delivers and the presence of any external caching layers such as LiteSpeed or Redis.

Context Recommended Joomla Cache Mode Why?
Redis enabled Conservative Respects the “cachable” setting on modules, avoiding issues with dynamic content.
Static site without user interaction Progressive (test carefully) Caches all modules for maximum performance.
LiteSpeed only (LSCache active) Conservative Reduces conflicts with server-side page caching.
LiteSpeed + Redis Conservative Combines server page caching (LiteSpeed) with object caching (Redis) effectively.

Summary: Conservative caching is safest for dynamic sites, logged-in users, and setups using external caches. Progressive caching may be suitable for brochure-style websites with no user-specific content.

Redis and third-party extensions

Some Joomla extensions use Joomla’s object cache internally, even if caching is disabled globally. This means that complex queries or objects can be cached automatically when Redis is enabled, without needing any changes in the extension.

Redis acts as a silent performance booster, particularly for dynamic content or data-heavy components.

What about ESI?

ESI (Edge Side Includes) allows independent blocks of a page to be cached separately—such as user login modules or shopping carts. This avoids rebuilding the full page for minor changes.

However, this feature is only available in LiteSpeed Enterprise. If your server runs OpenLiteSpeed, ESI will not work, and a warning message will appear in the Joomla plugin.

Even without ESI, LiteSpeed and Redis together still offer excellent performance gains.

Real test results

We ran tests using WebPageTest.org on a Joomla site configured in three different ways:

Setup TTFB Start Render First Contentful Paint Speed Index LCP Page size
No LiteSpeed, no cache 0.336s 0.900s 0.875s 1.139s 1.187s 698 KB
LiteSpeed only (no Redis) 0.224s 0.900s 0.886s 1.062s 1.086s 699 KB
LiteSpeed + Redis (conservative cache) 0.227s 0.600s 0.666s 1.370s 1.631s 699 KB

The results show:

Redis mainly improves Joomla’s internal performance, while LiteSpeed optimizes the server’s response time.

Testing tools

Want to test your own site? Here are some helpful tools:

Conclusion

LiteSpeed and Redis form a powerful combo to optimize Joomla’s performance. LiteSpeed cuts server response times, Redis lightens internal processing, and the official plugin makes integration easy.

A future article will explore a similar optimization path using Nginx as a free and powerful alternative to LiteSpeed.


Parli italiano? Check the Italian version here: https://www.joomlaitalia.it/guide-e-tutorial/traduzioni-joomla-magazine/velocizzare-joomla-con-litespeed-cache-e-redis 

Leave Comments