
內容簡介
此外掛會在更新 WordPress 核心、主題和檔案後清除 OPcache 快取。
與其他外掛不同,它也與透過 Linux 啟動的 WordPress 更新相容,詳情請見此文件。
注意事項
重要提示:使用此外掛前,請確認以下事項是否正確。
您使用的 PHP 版本是否為 5.5 或更新,是否以啟用 –enable-opcache 選項方式編譯 PHP?
如果使用的是 PHP 5.4 或更早版本,您是否有安裝 PECL ZendOpcache?
如果沒有,請參考此文件啟用或安裝 OPcache。
此外掛要能夠清除 OPcache 快取,必須在您的 PATH 路徑下,設定 cachetool 工具,並將其命名為 cachetool。
您需要在 Linux 操作系統上安裝「which」工具,以讓此外掛能正常運作。
外掛標籤
開發者團隊
原文外掛簡介
This plugin clears OPcache after updating WordPress core, themes, and files.
Unlike other plugins, it is also compatible with WordPress updates made by Linux cron.
Features
Automatic OPcache reset after plugin/theme/core updates
Clears both memory-based and file-based OPcache
Works with cron-based WordPress updates (CLI context)
WP-CLI commands for manual OPcache management
Zero external dependencies (optional cachetool support)
Configuration
The plugin works automatically for web-based updates. For CLI-based updates (cron, WP-CLI), configure your PHP-FPM socket:
Option 1: Create .cachetool.yml in your WordPress root:
adapter: fastcgi
fastcgi: /run/php-fpm/www.sock
Option 2: Use cachetool binary (if installed in PATH)
WP-CLI Commands
Reset OPcache from the command line:
wp opcache reset
Show OPcache status and statistics:
wp opcache status
Output status as JSON:
wp opcache status --format=json
