BACK TO DIRECTORY

OPcache Reset

by Danila Vershinin

4.0
(1 ratings)

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 and no shell commands

Configuration

The plugin works automatically for web-based updates. For CLI-based updates (cron, WP-CLI), configure your PHP-FPM socket:

Create a CacheTool-compatible .cachetool.yml in your WordPress root:

adapter: fastcgi
fastcgi: /run/php-fpm/www.sock

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

Plugin Details

Active Installs
500
Total Downloads
9,819
Version
2.4.3
Requires WP
5.0
Requires PHP
7.4
Tested Up To
7.1
Added
2018-06-01
Last Updated
2026-09-01 3:23am GMT

Ratings

5
0
4
1
3
0
2
0
1
0