Title: OPcache Reset
Author: Danila Vershinin
Published: <strong>Òkúdù 1, 2018</strong>
Last modified: Ògún  6, 2026

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/opcache-reset/assets/banner-772x250.png?rev=3419574)

![](https://ps.w.org/opcache-reset/assets/icon.svg?rev=3419574)

# OPcache Reset

 Láti ọwọ́ [Danila Vershinin](https://profiles.wordpress.org/dvershinin/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/opcache-reset.2.4.1.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/opcache-reset/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/opcache-reset/#reviews)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/opcache-reset/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/opcache-reset/)

## Àpèjúwe

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](https://www.getpagespeed.com/server-setup/performance-friendly-wordpress-updates).

### 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
    ```

## Àwọn àgbéyẹ̀wò

![](https://secure.gravatar.com/avatar/bdd6d3a0444ba0b213f7ce42cc7fa01ae5f4a0b76f182675c91edb64b0ea2eb6?
s=60&d=retro&r=g)

### 󠀁[Good !](https://wordpress.org/support/topic/good-4504/)󠁿

 [geoffreymerck](https://profiles.wordpress.org/geoffreymerck/) Èbìbí 27, 2019

This almost what I have been looking for. The OPCache is also reset when installing
new plugins, but not when deinstalling.

 [ Ka gbogbo àgbéyẹ̀wò 1 ](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## Àwọn Olùkópa & Olùgbéejáde

“OPcache Reset” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa
sí plugin yìí.

Àwọn Olùkópa

 *   [ Danila Vershinin ](https://profiles.wordpress.org/dvershinin/)

A ti túmọ̀ “OPcache Reset” sí èdè agbègbè 1 kan. Ọpẹ́lọpẹ́ fún [àwọn atúmọ̀ èdè](https://translate.wordpress.org/projects/wp-plugins/opcache-reset/contributors)
fún àwọn ìkópa wọn.

[Túmọ̀ “OPcache Reset” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/opcache-reset/), ṣàyẹ̀wò
[ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/opcache-reset/), tàbí ṣe àgbékalẹ̀
sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/opcache-reset/) 
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/opcache-reset/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 2.4.1

 * Reset PHP-FPM OPcache from cron and WP-CLI without `shell_exec` or a CacheTool
   binary
 * Replace shell-based file cache cleanup with native PHP filesystem operations
 * Improve FastCGI configuration, response validation, and error handling
 * Add direct-access protection and prefix internal functions and constants
 * Exclude development-only hidden files from release packages
 * Add disabled-`shell_exec` regression coverage

#### 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.

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **2.4.1**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọjọ́ 4 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **400+**
 *  Ẹ̀yà WordPress ** 5.0 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **7.0.3**
 *  Ẹ̀yà PHP ** 7.4 tàbí ju bẹ́ẹ̀ lọ **
 *  Àwọn èdè
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/opcache-reset/) àti [English (US)](https://wordpress.org/plugins/opcache-reset/).
 *  [Túmọ̀ sí èdè rẹ](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)
 * Àwọn àmì
 * [cache](https://yor.wordpress.org/plugins/tags/cache/)[OPcache](https://yor.wordpress.org/plugins/tags/opcache/)
   [php](https://yor.wordpress.org/plugins/tags/php/)[wp-cli](https://yor.wordpress.org/plugins/tags/wp-cli/)
   [Zend](https://yor.wordpress.org/plugins/tags/zend/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/opcache-reset/advanced/)

## Àwọn ìbò

 4 lára àwọn ìràwọ̀ 5.

 *  [  0 5-star reviews     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/opcache-reset/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## Àwọn Olùkópa

 *   [ Danila Vershinin ](https://profiles.wordpress.org/dvershinin/)

## Ìrànlọ́wọ́

Àwọn ọ̀ràn tí a yanjú ní oṣù méjì tó kọjá:

     0 nínú 1

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/opcache-reset/)

## Ṣe ìtọrẹ

Ṣé o fẹ́ ṣe àtìlẹ́yìn fún ìlọsíwájú plugin yìí?

 [ Ṣe ìtọrẹ sí plugin yìí ](https://github.com/sponsors/dvershinin)