Title: OPcache Reset
Author: Danila Vershinin
Published: <strong>2018(&#101;)k&#111; ekaina&#114;&#101;&#110; 1(&#97;)</strong>
Last modified: 2026(&#101;)k&#111; abuztua&#114;&#101;&#110; 6(&#97;)

---

Bilatu pluginak

![](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

 [Danila Vershinin](https://profiles.wordpress.org/dvershinin/)-(r)en eskutik

[Deskargatu](https://downloads.wordpress.org/plugin/opcache-reset.2.4.1.zip)

 * [Xehetasunak](https://eu.wordpress.org/plugins/opcache-reset/#description)
 * [Berrikuspenak](https://eu.wordpress.org/plugins/opcache-reset/#reviews)
 * [Garapena](https://eu.wordpress.org/plugins/opcache-reset/#developers)

 [Laguntza](https://wordpress.org/support/plugin/opcache-reset/)

## Deskripzioa

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

## Berrikuspenak

![](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/) 2019(e)ko maiatzaren
27(a)

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

 [ Irakurri berrikuspen bakarra ](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## Laguntzaileak eta Garatzaileak

“OPcache Reset” software librea da. Ondoko pertsonek egin dizkiote ekarpenak plugin
honi.

Laguntzaileak

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

OPcache Reset 1 eskualde-ezarpenera itzuli da. Eskerrik asko [itzultzaileei](https://translate.wordpress.org/projects/wp-plugins/opcache-reset/contributors)
beraien ekarpenengatik.

[Itzul zaitez OPcache Reset zure hizkuntzara.](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)

### Garapena interesatzen zaizu?

[Araka kodea](https://plugins.trac.wordpress.org/browser/opcache-reset/), begiratu
[SVN biltegia](https://plugins.svn.wordpress.org/opcache-reset/) edo harpidetu [garapen erregistrora](https://plugins.trac.wordpress.org/log/opcache-reset/)
[RSS](https://plugins.trac.wordpress.org/log/opcache-reset/?limit=100&mode=stop_on_copy&format=rss)
bidez.

## Aldaketen loga

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

## Meta

 *  Version **2.4.1**
 *  Azken eguneraketa **duela aste 1**
 *  Instalazio aktiboak **400+**
 *  WordPress bertsioa ** 5.0 edo handiagoa **
 *  **7.0.4** (e)raino probatuta.
 *  PHP bertsioa ** 7.4 edo handiagoa **
 *  Hizkuntzak
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/opcache-reset/) eta .[English (US)](https://wordpress.org/plugins/opcache-reset/).
 *  [Itzuli zure hizkuntzara](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)
 * Etiketak
 * [cache](https://eu.wordpress.org/plugins/tags/cache/)[OPcache](https://eu.wordpress.org/plugins/tags/opcache/)
   [php](https://eu.wordpress.org/plugins/tags/php/)[wp-cli](https://eu.wordpress.org/plugins/tags/wp-cli/)
   [Zend](https://eu.wordpress.org/plugins/tags/zend/)
 *  [Ikuspegi aurreratua](https://eu.wordpress.org/plugins/opcache-reset/advanced/)

## Balorazioak

 4 out of 5 stars.

 *  [  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/)

## Laguntzaileak

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

## Laguntza

Azken bi hilabeteetan konpondutako gertakariak:

     1(e)tik 0

 [Ikusi laguntza foroa](https://wordpress.org/support/plugin/opcache-reset/)

## Egizu eskaintza

Plugin honen aurrerabidearen euskarri izan nahi duzu?

 [ Egiozu eskaintza plugin honi ](https://github.com/sponsors/dvershinin)