Title: Varnish/Nginx Proxy Caching
Author: Razvan Stanga
Published: <strong>Bélú 25, 2015</strong>
Last modified: Ọ̀wàrà 21, 2019

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/vcaching/assets/banner-772x250.png?rev=1416085)

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://ps.w.org/vcaching/assets/icon-256x256.png?rev=1293998)

# Varnish/Nginx Proxy Caching

 Láti ọwọ́ [Razvan Stanga](https://profiles.wordpress.org/razvanstanga/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/vcaching.1.8.3.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/vcaching/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/vcaching/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/vcaching/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/vcaching/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/vcaching/)

## Àpèjúwe

Complete WordPress Varnish Cache 3.x/4.x/5.x and Nginx Proxy Cache integration.

This plugin handles all integration with Varnish Cache and Nginx Proxy Cache. It
was designed for high traffic websites.

Main features

 * admin interface, see screenshots
 * console for manual purges, supports regular expressions so you can purge an entire
   folder or just a single file
 * supports every type of Varnish Cache implementation, see screenshots for examples
 * unlimited number of Varnish Cache servers
 * use of custom headers when communicating with Varnish Cache does not interfere
   with other caching plugins, cloudflare, etc
 * Varnish Cache configuration generator
 * purge key method so you donÌtumọ̀ Yorùbá: ’t need to setup ACLs
 * debugging
 * actively maintained

You can control the following from the Varnish Caching admin panel :

 * Enable/Disable caching
 * Homepage cache TTL
 * Cache TTL (for every other page)
 * IPs/Hosts to clear cache to support every type of Varnish Cache implementation
 * Override default TTL in posts/pages
 * Purge key based PURGE
 * Logged in cookie
 * Debugging option
 * console for precise manual purges

This plugin also auto purges Varnish Cache / Nginx Proxy Cache when your site is
modified.

Varnish Caching sends a PURGE request to Varnish Cache / Nginx Proxy Cache when 
a page or post is modified. This occurs when editing, publishing, commenting or 
deleting an item, and when changing themes.
 Not all pages are purged every time,
depending on your Varnish / Nginx Proxy Cache configuration. When a post, page, 
or custom post type is edited, or a new comment is added, _only_ the following pages
will purge:

 * The front page
 * The post/page edited
 * Any categories or tags associated with the page

[Varnish Cache](https://www.varnish-cache.org/) / [Nginx Proxy Cache](https://www.nginx.com/blog/nginx-caching-guide/)
is a web application accelerator also known as a caching HTTP reverse proxy. You
install it in front of any server that speaks HTTP and configure it to cache the
contents. This plugin _does not_ install Varnish/Nginx for you, nor does it configure
Varnish/Nginx for WordPress. ItÌtumọ̀ Yorùbá: ’s expected you already did that on
your own using the provided config files.

Inspired from the following :

 * https://wordpress.org/plugins/varnish-http-purge/
 * https://github.com/dreamhost/varnish-vcl-collection/

## Àwọn àwòrán ìbòjú

 * [[
 * Settings admin panel
 * [[
 * Console/manual purge admin panel
 * [[
 * Varnish Cache Statistics admin panel
 * [[
 * Varnish Cache configuration generator admin panel
 * [[
 * override default TTL in posts/pages
 * [[
 * integration example

## Ìgbéwọlẹ̀

 * You must install Varnish Cache/Nginx Proxy Cache on your server(s)
 * Go to the configuration generator. Fill in the backends/ACLs then download the
   configuration files
 * Use these configuration files to configure Varnish Cache server(s). Usualy the
   configuration files are in /etc/varnish. In most cases you must put the downloaded
   configuration files in /etc/varnish and restart Varnish Cache
 * The configuration generator does not support Nginx for now. Read the Nginx documentation
   on how to enable proxy cache

Or use the provided Varnish Cache configuration files located in /wp-content/plugins/
vcaching/varnish-conf folder.

You can also use the purge key method if you canÌtumọ̀ Yorùbá: ’t setup ACLs. You
must fill in lib/purge.vcl the purge key.

## FAQ

  What version of Varnish Cache is supported?

This was built and tested on Varnish 3.x/4.x/5.x.

  Is Nginx supported?

Nginx is supported if you configure Nginx to use the PURGE method. Read the official
Nginx documentaton on how to do this. Also there are a lot of tutorials to do this.

  Why doesnÌtumọ̀ Yorùbá: ’t every page flush when I make a new post?

The only pages that should purge are the postÌtumọ̀ Yorùbá: ’s page, the front page,
categories, and tags.

  How do I manually purge the whole cache?

Click the ‘Purge ALL Varnish Cache’ button on the “Right Now” Dashboard.

  How do I manually purge cache?

Use the console. For example you can purge the whole uploads folder with the URL/
wp-content/uploads/.*

  Does this work with W3 Total Cache?

Yes it does. This plugin uses its own custom headers to communicate with Varnish
and does not interfere with the heders sent by W3 Total Cache or any other caching
plugin.

  Varnish Statistics

Statistics need a special setup. More info on the Statistics tab on your WordPress
environment.

  How do I configure my Varnish Cache VCL?

Use the Varnish Cache configuration generator. Fill in the backends/ACLs then download
your configuration files.
 Or use the provided Varnish Cache configuration files
located in /wp-content/plugins/vcaching/varnish-conf folder.

  Can I use this with a proxy service like CloudFlare?

Yes.

  What is logged in cookie?

Logged in cookie is a special cookie this plugin sets upon user login. Varnish Cache
uses this cookie to bypass caching for logged in users.

This is a small step towards securing your site for denial of service attacks. Denial
of service attacks can happen if the attacker bypasses Varnish Cache and hits the
backend directly.
 With the current configuration and the way WordPress works, this
can still happen with POST/AJAX requests.

  Available filters

 * `vcaching_varnish_ips` Ìtumọ̀ Yorùbá: – change the IPs set in Settings
 * `vcaching_varnish_hosts` Ìtumọ̀ Yorùbá: – change the Hosts set in Settings
 * `vcaching_events` Ìtumọ̀ Yorùbá: – add events to trigger the purge
 * `vcaching_schema` Ìtumọ̀ Yorùbá: – change the schema (default is http://)
 * `vcaching_purge_urls` Ìtumọ̀ Yorùbá: – add additional URLs to purge

## Àwọn àgbéyẹ̀wò

![](https://secure.gravatar.com/avatar/4ecabb8b5714069158384d23cc495d802d77b29a0a81d86f699013b6f59a4ffb?
s=60&d=retro&r=g)

### 󠀁[Docker works with this](https://wordpress.org/support/topic/docker-works-with-this/)󠁿

 [Patrick_D1985](https://profiles.wordpress.org/patrick_d1985/) Ọ̀pẹ 4, 2019

There are a bunch of Varnish purging / banning plugins out there but this is the
only one that seems to work with a Plesk Docker container setup. Very much appreciated
🙂

![](https://secure.gravatar.com/avatar/ca4650f449cfa6d9fa3d3cb744894aac6d9bdfc4ca63882d0b581f221840ea3e?
s=60&d=retro&r=g)

### 󠀁[Amazing](https://wordpress.org/support/topic/amazing-1824/)󠁿

 [billyengler](https://profiles.wordpress.org/billyengler/) Agẹmọ 10, 2018

IÌtumọ̀ Yorùbá: ’ve spent months (on and off) trying to achieve what the VCL generator
this plugin has gives to you. Simply amazing. And the few tweaks I needed I learned
from my months of failure. Thank you for this great plugin!

![](https://secure.gravatar.com/avatar/67042f7d56bd3ec22dd61c18b7dccebf7bbdb98f686f338a2093c118f83c912e?
s=60&d=retro&r=g)

### 󠀁[Great Simple Plugin that does the job!](https://wordpress.org/support/topic/great-simple-plugin-that-does-the-job/)󠁿

 [Sinclair](https://profiles.wordpress.org/sinclairfr/) Igbe 15, 2018

Configuring Varnish is so hard and even if you get varnish to work usually it does
not cache. Well, with this plugin, the nightmare is over. Great work. Thank you.

![](https://secure.gravatar.com/avatar/3039c023ff16191649c7cd9156fcdf7262a14f7127cf41496c3a9a39ad1c1280?
s=60&d=retro&r=g)

### 󠀁[great](https://wordpress.org/support/topic/great-6435/)󠁿

 [aelsharawi](https://profiles.wordpress.org/aelsharawi/) Èbìbí 6, 2017

Just great plugin with rapid support

![](https://secure.gravatar.com/avatar/5b6fd0b5fe6b2183aae169d9de890b586d130baeee7f9f79a8bdb7fa4518e94f?
s=60&d=retro&r=g)

### 󠀁[Age 0 problem in header solved by this plugin](https://wordpress.org/support/topic/age-0-problem-in-header-solved-by-this-plugin/)󠁿

 [jugadelpi](https://profiles.wordpress.org/jugadelpi/) Bélú 7, 2016 5 àwọn ìdáhùn

A great way to test if Varnish is truly and totally working on website is verifying
if the “age” value is increasing in pageÌtumọ̀ Yorùbá: ’s header when checking the
website using a tool like ChromeÌtumọ̀ Yorùbá: ’s Developer Tools. http://d33v4339jhl8k0.
cloudfront.net/docs/assets/5415e7bfe4b01e2a68fe8243/images/58058721c697915a23d7a629/
file-a9Lg9golUw.jpg I was having a problem where this age value in header was always
0 which meant that Varnish was not caching pages properly. After testing different
Varnish configs from Google, I was never able to make it work. After installing 
this plugin, this age value is now increasing. It integrates perfectly with wordpress.
However, the purge option was not working properly on my website and the age value(
which was now increasing thanks to this plugin) was not being purged when purging
Varnish using this plugin, therefore, it was constantaly increasing without rolling
back to 0. Nevertheless, this purge problem was also resolved after installing the“
Varnish HTTP Purge” plugin.

![](https://secure.gravatar.com/avatar/7f55faf94a4daadd4f4fc0dd5beed05995b3ae7db85c4daec36c7f47791fa132?
s=60&d=retro&r=g)

### 󠀁[Works nicely from start](https://wordpress.org/support/topic/works-nicely-from-start/)󠁿

 [David_V](https://profiles.wordpress.org/david_v/) Ọwẹ́wẹ̀ 3, 2016

No more “Guru meditation” and integates nicely. Thanks!

 [ Ka gbogbo àwọn àgbéyẹ̀wò 10 ](https://wordpress.org/support/plugin/vcaching/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“Varnish/Nginx Proxy Caching” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí
ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

 *   [ Razvan Stanga ](https://profiles.wordpress.org/razvanstanga/)

A ti túmọ̀ “Varnish/Nginx Proxy Caching” sí àwọn èdè agbègbè 4. Ọpẹ́lọpẹ́ fún [àwọn atúmọ̀ èdè](https://translate.wordpress.org/projects/wp-plugins/vcaching/contributors)
fún àwọn ìkópa wọn.

[Túmọ̀ “Varnish/Nginx Proxy Caching” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/vcaching)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/vcaching/), ṣàyẹ̀wò [ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/vcaching/),
tàbí ṣe àgbékalẹ̀ sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/vcaching/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/vcaching/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 1.8.3

 * scheduled posts flush

#### 1.8.2

 * readme.txt update

#### 1.8.1

 * typo fix

#### 1.8.0

 * Nginx Proxy Cache support, uninstall script, use ssl optimization

#### 1.7.0

 * various bugfixes

#### 1.6.9

 * fixed php notice

#### 1.6.8

 * fixed wp-cli calling an older method name

#### 1.6.7

 * use sys_get_temp_dir() to address open_basedir restictions to /tmp. thanks @maltfield

#### 1.6.6

 * no more SSl auto detection. If you use SSL with Varnish use the option ‘Use SSL(
   https://) for purge requests.’
 * there are cases where the website uses SSL, but the Varnish servers do not

#### 1.6.5

 * added sslverify set default to false to wp_remote_request. thanks @Jules81

#### 1.6.4

 * fixed php notice

#### 1.6.3

 * added SSL to schema filter. thanks @Jules81

#### 1.6.2

 * fixed purge_post empty 2nd param

#### 1.6.1

 * Do/do not purge when saving menus option
 * fixed bug showing multiple `Truncate message activated ...`

#### 1.6

 * Varnish 5.x support

#### 1.5.5

 * fixed ob_end_flush error in wp-admin while debug is on. thanks @samlangdon

#### 1.5.4

 * improvements to Varnish configs like websocket support, remove the Google Analytics
   added parameters, strip hash, remove unnecessary cookies. thanks @pavelprischepa

#### 1.5.3

 * hardcoded on/off VCL Generator, filters added to readme

#### 1.5.2

 * added AMP URL purge

#### 1.5.1

 * fixed PHP notices
 * tested with 4.6

#### 1.5

 * `Purge from Varnish` post/page action link
 * removed 10 chars logged in cookie restriction
 * code cleanup/some wp coding standards
 * vcaching_varnish_ips filter
 * vcaching_varnish_hosts filter

#### 1.4.3

 * Truncate option added for too many ‘trying to purge’ messages. Added check for
   ZipArchive class to download VCLs.

#### 1.4.2

 * Bugfix release. Replaced home_url with plugins_url to show VCaching image

#### 1.4.1

 * Do not cache static files on admin domain

#### 1.4

 * Varnish Cache configuration generator
 * added `logged in cookie`. This replaces the logged in admin/user based on WordPress
   standard cookies to bypass caching
 * moved backends to conf/backend.vcl
 * moved ACLs to conf/acl.vcl
 * updated VCLs. If you are using 1.3 VCLs should upgrade to 1.4

#### 1.3.3

 * support for Varnish 4

#### 1.3.2

 * bugfix displaying a single server stats

#### 1.3.1

 * better varnish statistics, generated by varnishstat

#### 1.3

 * varnish statistics

#### 1.2.3

 * wordpress 4.4 compatibility
 * Romanian language file

#### 1.2.1

 * wp cli

#### 1.2

 * console for precise manual purge

#### 1.1

 * Play nice with W3 Total Cache

#### 1.0

 * Initial commit

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **1.8.3**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 7 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **800+**
 *  Ẹ̀yà WordPress ** 4.0 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **5.2.24**
 *  Ẹ̀yà PHP ** 5.2.4 tàbí ju bẹ́ẹ̀ lọ **
 *  Àwọn èdè
 * [English (Australia)](https://en-au.wordpress.org/plugins/vcaching/), [English (Canada)](https://en-ca.wordpress.org/plugins/vcaching/),
   [English (New Zealand)](https://en-nz.wordpress.org/plugins/vcaching/), [English (South Africa)](https://en-za.wordpress.org/plugins/vcaching/),
   àti [English (US)](https://wordpress.org/plugins/vcaching/).
 *  [Túmọ̀ sí èdè rẹ](https://translate.wordpress.org/projects/wp-plugins/vcaching)
 * Àwọn àmì
 * [cache](https://yor.wordpress.org/plugins/tags/cache/)[caching](https://yor.wordpress.org/plugins/tags/caching/)
   [nginx](https://yor.wordpress.org/plugins/tags/nginx/)[Purge](https://yor.wordpress.org/plugins/tags/purge/)
   [varnish](https://yor.wordpress.org/plugins/tags/varnish/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/vcaching/advanced/)

## Àwọn ìbò

 5 lára àwọn ìràwọ̀ 5.

 *  [  10 5-star reviews     ](https://wordpress.org/support/plugin/vcaching/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/vcaching/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/vcaching/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/vcaching/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/vcaching/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/vcaching/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/vcaching/reviews/)

## Àwọn Olùkópa

 *   [ Razvan Stanga ](https://profiles.wordpress.org/razvanstanga/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/vcaching/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](https://www.paypal.me/razvanstanga)