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

후기

2019년 5월 27일
This almost what I have been looking for. The OPCache is also reset when installing new plugins, but not when deinstalling.
모든 1 평가 읽기

기여자 & 개발자

“OPcache Reset”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “OPcache Reset”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

2.4.0

  • Added WP-CLI commands: wp opcache reset and wp opcache status
  • Added direct FastCGI communication (no cachetool dependency required)
  • Added support for cachetool.yml configuration format
  • Added end-to-end FastCGI testing
  • Improved test coverage (34 tests)

2.3.0

  • Added comprehensive Docker-based integration test suite (27 tests)
  • Added GitHub Actions CI for linting and testing
  • Added PHPStan and PHPCS for code quality
  • Improved OPcache reset verification with validate_timestamps=0 testing
  • Added pre-commit hooks for automated code checks
  • Updated plugin assets (icons, banners)

2.2.0

  • Added support for file-based OPcache clearing with race condition handling
  • Improved cachetool invocation with proper PATH handling

2.1.2

  • No calling cachetool opcache:reset for setups with only file cache

2.1.0

  • Handle file OPcaches in a consistent fashion

2.0.0

  • Handle file OPCaches

1.0.0

  • Initial release.