Table of Contents
Description
This is a plugin for wordpress to intergrate the varnish cache for high performance websites.
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
Features
At present some of the features are,
- Multiple varnish backends
- Manually purge the cache
- Enable/Disable Feed Purging
- Ability to purge entire cache on changes
- Debug logging
- Minimize number of purges and remove duplicate purges for speed on larger installations
- Supports varnish 4 + 5
- Support for Woocommerce
Speed
Our tests show that by utilizing varnish you gain a ~70x capacity increase over standard WordPress making you resistant to traffic floods (slashdot, digg, reddit, stumbleupon).
Installation
To install the WordPress plugin.
- Get the latest version from https://www.admingeekz.com/files/varnish-wordpress.zip
- 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
The setup should be complete. You can enable Debug Logging temporarily to monitor what the plugin is doing. Test by enabling debug logging and adding a new post.
Plugin author
Plugin official website address
https://wordpress.org/plugins/varnish-wp/
If you encounter problems in using the Varnish WordPress plugin, you can comment below, and I will try my best to help you solve the problem