Accelerating Joomla with Varnish

Speed up your Joomla website by using server side, Apache caching tool, Varnish. Setting it up is a little difficult, but is it worth the trouble? Find out here.

Steven Johnson
by | Posted: June 8, 2011 | Updated: April 8, 2014

If you have seen other articles on the site you know we are on a quest to make Joomla run as fast as possible.

The next step was to set up a a server side cache that could help the site go faster.

We are filling in the document as we learn more about the best way to configure Varnish

What is Varnish

Varnish is a reverse proxy caching system that has the ability to cache your entire site.

How Varnish Works

To serve a website using varnish you will need two servers are running:

  1. Regular Apache listening for connections on port 8000 and serving Joomla.
  2. Varnish, acting as a cache layer between users and Apache.

When a visitor requests a resource, it checks if it's in the cache. If not, it connects to port 8000 and asks Apache for the resource. If the resource is cacheable, it's stored and served from cache the next time.

Whether the resource can be cached is determined using HTTP headers, mainly Expires is taken into account. By default, Joomla sends headers prohibiting browsers and proxies to cache, so its behavior needs to be modified by a plugin.


Varnish vs. Standard Joomla Cache


Install Varnish

1. you will need root access or an account with sufficient privildges

2. make and compile varnish

3. Set up your varnish config or VCL file

This is a pretty high level overview because the article is more focused on how joomla and Varnish work together.  For more specific instructions go to ????

Configure Joomla to work with Varnish

1. Install the plugin header expires.  This will allows you set the headers so that varnish can determine if the page should be served from the cache or not.


Results you can expect to see

Page speed increases


Additional Varnish Resources:

Varnish Cache Project

Steven Johnson

Steven is a Joomla web developer and worked with Joomla since the Mambo days. He has built websites for startup businesses all the way to for Fortune 500 companies. A graduate of Georgia Tech in Chemical Engineering, he now happily spends his time building websites and reviewing all types of technology.