Title: Varnish WordPress
Author: AdminGeekZ
Published: <strong>2013 年 10 月 23 日</strong>
Last modified: 2018 年 2 月 20 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/varnish-wp.svg)

# Varnish WordPress

 作者：[AdminGeekZ](https://profiles.wordpress.org/admingeekz/)

[下载](https://downloads.wordpress.org/plugin/varnish-wp.1.7.zip)

 * [详情](https://cn.wordpress.org/plugins/varnish-wp/#description)
 * [评价](https://cn.wordpress.org/plugins/varnish-wp/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/varnish-wp/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/varnish-wp/#developers)

 [支持](https://wordpress.org/support/plugin/varnish-wp/)

## 描述

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).

## 安装

#### To install the WordPress plugin.

 1. Get the latest version from https://www.admingeekz.com/files/varnish-wordpress.
    zip
 2. Copy the varnish-wordpress folder to wp-content/plugins/
 3. Login to wp-admin
 4. Go to Plugins->Installed Plugins on the left menu
 5. Under “Varnish WordPress” click “Activate”
 6. You should now see the varnish menu under “Settings”

#### To install the varnish VCL.

 1. Copy the file “default.vcl” provided with this plugin to your varnish installation
    path (/etc/varnish/default.vcl on most systems)
 2. Configure the backend in the default.vcl to point to the ip and port your webserver(
    s) are running on
 3. Restart varnish

#### To configure the WordPress plugin

 1. In the varnish backends box input the backends we need to access to purge the cache.(
    Format: ip:port)
 2. Check the enabled box
 3. 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.

## 常见问题

  Installation Instructions

#### To install the WordPress plugin.

 1. Get the latest version from https://www.admingeekz.com/files/varnish-wordpress.
    zip
 2. Copy the varnish-wordpress folder to wp-content/plugins/
 3. Login to wp-admin
 4. Go to Plugins->Installed Plugins on the left menu
 5. Under “Varnish WordPress” click “Activate”
 6. You should now see the varnish menu under “Settings”

#### To install the varnish VCL.

 1. Copy the file “default.vcl” provided with this plugin to your varnish installation
    path (/etc/varnish/default.vcl on most systems)
 2. Configure the backend in the default.vcl to point to the ip and port your webserver(
    s) are running on
 3. Restart varnish

#### To configure the WordPress plugin

 1. In the varnish backends box input the backends we need to access to purge the cache.(
    Format: ip:port)
 2. Check the enabled box
 3. 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.

  I have a question

Check the latest FAQ at the plugin home page on our website at [Varnish WordPress](http://www.admingeekz.com/varnish-wordpress)

## 评价

此插件暂无评价。

## 贡献者及开发者

「Varnish WordPress」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ AdminGeekZ ](https://profiles.wordpress.org/admingeekz/)

[帮助将「Varnish WordPress」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/varnish-wp)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/varnish-wp/)，查看[SVN仓库](https://plugins.svn.wordpress.org/varnish-wp/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/varnish-wp/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/varnish-wp/)。

## 更新日志

#### 1.7

 * Verified support with latest wordpress 4.9
 * Added woocommerce support

#### 1.6

 * Added better HTTPS support
 * Added varnish 4 and varnish 5 VCL’s
 * Fixed purging of all
 * Fixed enabling/disabling of plugin
 * Added extra debug logging
 * Show last logs and server headers when debug log is enabled

#### 1.5

 * Introduce support for separate wp-admin backend to allow for longer timeouts
 * Add comments/support to default varnish config for multiple domains/subdomains
   and SSL
 * Bugfix: the timeout for backends was not processed so defaulted to 0 seconds
 * Bugfix: typo in the error reporting when unable to connect to a backend
 * Bugfix: default styling for checkboxes was malformed in certain themes

#### 1.4

 * Updating readme, screenshots and installation documents to package and list as
   a plugin in the WordPress directory

#### 1.3

 * Processing purges on shutdown to prevent duplicates
 * Reintroduced transition status hook
 * Purge on theme change
 * Moved to github

#### 1.2

 * Added disable feed purge option
 * Added purge all option
 * Added manual purge option
 * Fixed a bug where the cache would not clear if you had wordpress in a subdirectory
 * Minor text and formatting bug fixes

#### 1.1

 * Added debug logging option
 * Added timeout option for varnish connections
 * Removed transition status hook, causes duplicate purges.

#### 1.0

 * Initial release

## 额外信息

 *  版本 **1.7**
 *  最后更新：**8 年前**
 *  活跃安装数量 **70+**
 *  WordPress 版本 ** 3.4 或更高版本 **
 *  已测试的最高版本为 **4.9.29**
 *  语言
 * [English (US)](https://wordpress.org/plugins/varnish-wp/)
 * 标签
 * [varnish cache](https://cn.wordpress.org/plugins/tags/varnish-cache/)[wordpress cache](https://cn.wordpress.org/plugins/tags/wordpress-cache/)
 *  [高级视图](https://cn.wordpress.org/plugins/varnish-wp/advanced/)

## 评级

尚未提交反馈。

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

[查看全部评论](https://wordpress.org/support/plugin/varnish-wp/reviews/)

## 贡献者

 *   [ AdminGeekZ ](https://profiles.wordpress.org/admingeekz/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/varnish-wp/)