OPcache Reset

plugin banner

Automatic OPcache reset for WordPress

Author:Danila Vershinin (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:6.9
Plugin version:2.4.0
Added to WordPress repository:01-06-2018
Last updated:15-12-2025
Rating, %:80
Rated by:1
Plugin URI:http://wordpress.org/plugins/opcache-reset/
Total downloads:7 715
Active installs:300+
plugin download
Click to start download

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

ChangeLog