Varnish WordPress - A cache plugin for WordPress
Improve Your WordPress Performance
This plugin is currently not maintained. We recommend using wp-rocket with static file caching enabled. If you would like to fund development of this project, get in touch.
This plugin will purge the cache on:
- Post changes (new, edit, trash, delete)
- Page changes (add, edit, remove)
- Comment changes (add, edit, approve, unapprove, spam, trash, delete)
- Theme changes
Installation
To install the WordPress plugin:
- Get the latest version from here.
- Copy the varnish-wordpress folder to wp-content/plugins/
- Login to wp-admin
- Go to Plugins->Installed Plugins on the left menu
- Under "Varnish WordPress" click "Activate"
- You should now see the varnish menu under "Settings"
To install the varnish VCL:
- Copy the file "default.vcl" provided with this plugin to your varnish installation path (/etc/varnish/default.vcl on most systems)
- Configure the backend in the default.vcl to point to the IP and port your webserver(s) are running on
- Restart varnish
To configure the WordPress plugin:
- In the varnish backends box input the backends we need to access to purge the cache. (Format: ip:port)
- Check the enabled box
- Click Save
Frequently Asked Questions
Q: Can it support SSL?
A: Varnish does not support SSL however you can use another webserver to terminate the SSL and forward HTTP traffic to varnish, such as nginx and use the hash_data to include the X-Forwarded-Port...