[WordPress] 外掛分享: OPcache Reset

首頁外掛目錄 › OPcache Reset
WordPress 外掛 OPcache Reset 的封面圖片
200+
安裝啟用
★★★★
4/5 分(1 則評價)
95 天前
最後更新
問題解決
WordPress 5.0+ PHP 7.4+ v2.4.0 上架:2018-05-31

內容簡介

此外掛會在更新 WordPress 核心、主題和檔案後清除 OPcache 快取。
與其他外掛不同,它也與透過 Linux 啟動的 WordPress 更新相容,詳情請見此文件。

注意事項

重要提示:使用此外掛前,請確認以下事項是否正確。

您使用的 PHP 版本是否為 5.5 或更新,是否以啟用 –enable-opcache 選項方式編譯 PHP?
如果使用的是 PHP 5.4 或更早版本,您是否有安裝 PECL ZendOpcache?
如果沒有,請參考此文件啟用或安裝 OPcache。
此外掛要能夠清除 OPcache 快取,必須在您的 PATH 路徑下,設定 cachetool 工具,並將其命名為 cachetool。
您需要在 Linux 操作系統上安裝「which」工具,以讓此外掛能正常運作。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.4.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「OPcache Reset」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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

延伸相關外掛

文章
Filter
Apply Filters
Mastodon