這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Purge Varnish Cache

外掛說明

Purge Varnish Cache provides integration between your WordPress site and multiple Varnish Cache servers. Purge Varnish Cache sends a PURGE request to the URL of a page or post every time based on configured actions and trigger by site administrator. Varnish is a web application accelerator also known as a caching HTTP reverse proxy.

Features:
* Support on all varnish versions of 3.x, 4.x, 5.x and 6.x
* One time configuration.
* admin-socket integration and Varnish admin interface for status.
* unlimited number of Varnish Cache servers.
* Custom URLs purge.
* User interface for manual purge.
* Single click entire cache purge.
* Debugging.
* Actively maintained.

Requirements: Apache sockets module/extention should be enabled.

Purpose: The main purpose of developing this plugin is to deliver updated copy of content to end user without any delay.

Enhancement Request: For any further enhancement, please mail me at dev.firoza@gmail.com

螢幕擷圖

  • Terminal settings screen for test connectivity from varnish server.

  • Action trigger configuration screen to make automate purge varnish cache for post expiration.

  • Action trigger configuration screen to make automate purge varnish cache for comment expiration.

  • Action trigger configuration screen to make automate purge varnish cache on menu update.

  • Action trigger configuration screen to make automate purge varnish cache on theme change.

  • Purge whole site cache.

  • Purge URLs screen to purge URLs manually from varnish cache.

安裝方式

How to install Purge Varnish?

  • Go to your admin area and select Plugins -> Add new from the menu.
  • Search for “Purge Varnish” or download
  • Click install and then click on activate link.

How to configure settings?

  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-settings and configure terminal settings.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-expire and configure required actions and events.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-urls for purge urls from varnish cache.
  • Access the link DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-all to purge all varnish cache.

常見問題集

How can I check everything’s working?

It is not difficult. Install this plugin and configure Terminal settings using below link.
DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-settings.

If status is ‘Varnish running’ means everything is working perfectly!

What versions of Varnish is supported?

Currently it is supporting all varnish versions of 3.x, 4.x, 5.x and 6.x

How do I manually purge a single URL from varnish cache?

Click on ‘Purge URLs’ link or access below link.
DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-urls.

What if I have multiple varnish Servers/IPs?

You need to configure multiple IPs in Varnish Control Terminal textfield in ‘Terminal’ screen like 127.0.0.1:6082 127.0.0.2:6082 127.0.0.3:6082

How can I debug?

Add below constant in wp-config.php file.
define(‘WP_VARNISH_PURGE_DEBUG’, true);

It will generate a log file ‘purge_varnish_log.txt’ inside uploads directory.

How do I manually purge the whole site cache?

Clicking on link ‘Purge all’ or access below link:
DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-all.

What it purge?

It allow you to configure purge settings.
Please configure by clicking on Expire link or accessing below link.
DOMAIN_NAME/wp-admin/admin.php?page=purge-varnish-expire to configure purge expire setting.Clicking on Expire link

使用者評論

2022 年 11 月 24 日 3 則留言
EDIT: Resolved very quick. We’ve just finished scanning of our website, and malware scanner reported file wp-content/plugins/purge-varnish/images/purge16x16.png If you open that file in text editor, you’ll notice some Javascript although it’s PNG file. Please let me know why this file contains suspicious JS. Everything else is great.
2017 年 10 月 1 日
developer help solve problem, thanks a lot this plugin is useful for my site, can auto purge Varnish
2017 年 7 月 20 日
Initially had some issues with this plugin working properly, so I contacted the plugin author. He was extremely friendly and very fast to respond, and he added some code to fix my issue. Plugin works perfectly now with WP 4.8 and Varnish 5, and I’m very happy with it. I’d recommend it over the other Varnish plugins at this point, because it works with Varnish 5 and most others seem to be stuck on 3 or have limited support for 4.
閱讀全部 9 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Purge Varnish Cache〉的開發相關工作。

參與者

將〈Purge Varnish Cache〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1.4

Fix:
1. PHP 8 error: socket_connect()= 1.1.3 =

Fix:
1. Make it Comptable with WP 6.0.2

1.1.2

Fix:
1. Update Icon

1.1.1

Fix:
1. Resolve css conflicts occur with wp-admin elements

1.1.0

Fix:
1. Fix Notice: Undefined index.
2. AH01071: Got error ‘PHP message: Recieved status code 106

1.0.9

Fix:
1. Fix minor warning issues.
2. Fix css issues.
3. Re-test on php7.2

1.0.8

Fix:
1. Wrong number of arguments’ errors filling up logs.
2. Purge Varnish cache on comment post/update on published post.

1.0.7

Fix:

  1. Plugin shows white screen after setup.
  2. Multiple Varnish terminals connect message is wrong.

1.0.6

Fix:
1. Plugin shows white screen after setup.
1. Multiple Varnish terminals connect message is wrong.

Implement Trigger to purge post on comment approved/unapproved
Fix: Wrong number of arguments
Update respected screens.

1.0.5

Purge Custom URLs
Update screens.

1.0.4

Enable expire configuration automatically when plug in enabled.
Add more tags.
Update screens.

Version 2.x

  • PHP 4.x/5.x/6.x/7.x compatibility.