4 minutos de lectura ( 746 palabras)

Boosting Joomla with LiteSpeed Cache and Redis

Boosting Joomla with Lite Speed 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:

  • Optimized PHP handling via LSAPI (faster than FastCGI)
  • Built-in full page cache (LSCache)
  • Support for HTTP/3 (via QUIC)
  • Integrated tools for fine-tuned resource control

LiteSpeed is available in two editions:

  • OpenLiteSpeed: Free, but does not support all features (such as ESI)
  • LiteSpeed Enterprise: Commercial version with full capabilities

The LiteSpeed Cache Plugin for Joomla

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

  • Full page HTML caching
  • Automatic purging when content is updated
  • Minification of CSS, JS, and HTML files
  • Integration with object caching tools like Redis or Memcached

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":

  • Cache handler: Redis
  • Cache mode: Conservative (recommended)

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:

  • LiteSpeed significantly improves TTFB (from 336 ms to 224 ms)
  • Redis does not affect TTFB, but speeds up the first visual output
  • Speed Index and LCP are slightly higher with Redis, likely due to cache behavior or page composition

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.

Some articles published on the Joomla Community Magazine represent the personal opinion or experience of the Author on the specific topic and might not be aligned to the official position of the Joomla Project

7
The April Issue
 

Comentarios

¿Ya està registrado? Ingresa Aquí
No hay comentarios por el momento. Sé el primero en enviar un comentario.

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/