Title: OPcache Reset
Author: Danila Vershinin
Published: <strong>1 Tháng 6, 2018</strong>
Last modified: 15 Tháng 12, 2025

---

Tìm kiếm 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

 Bởi [Danila Vershinin](https://profiles.wordpress.org/dvershinin/)

[Tải về](https://downloads.wordpress.org/plugin/opcache-reset.2.4.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/opcache-reset/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/opcache-reset/#reviews)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/opcache-reset/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/opcache-reset/)

## Mô tả

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

## Đánh giá

![](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/) 27 Tháng 5, 2019

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

 [ Đọc tất cả 1 đánh giá ](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## Người đóng góp & Lập trình viên

“OPcache Reset” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

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

“OPcache Reset” đã được dịch qua 1 ngôn ngữ. Cảm ơn [những người tham gia dịch](https://translate.wordpress.org/projects/wp-plugins/opcache-reset/contributors)
vì đóng góp của họ.

[Dịch “OPcache Reset” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/opcache-reset/), check out
[SVN repository](https://plugins.svn.wordpress.org/opcache-reset/), hoặc theo dõi
[nhật ký phát triển](https://plugins.trac.wordpress.org/log/opcache-reset/) qua 
[RSS](https://plugins.trac.wordpress.org/log/opcache-reset/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

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

 *  Phiên bản **2.4.0**
 *  Cập nhật lần cuối **5 tháng trước**
 *  Số lượt cài đặt **300+**
 *  Phiên bản WordPress ** 5.0 hoặc cao hơn **
 *  Đã kiểm tra lên đến **6.9.4**
 *  Phiên bản PHP ** 7.4 hoặc cao hơn **
 *  Ngôn ngữ
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/opcache-reset/) và [English (US)](https://wordpress.org/plugins/opcache-reset/).
 *  [Dịch sang ngôn ngữ của bạn](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)
 * Thẻ
 * [cache](https://vi.wordpress.org/plugins/tags/cache/)[OPcache](https://vi.wordpress.org/plugins/tags/opcache/)
   [php](https://vi.wordpress.org/plugins/tags/php/)[wp-cli](https://vi.wordpress.org/plugins/tags/wp-cli/)
   [Zend](https://vi.wordpress.org/plugins/tags/zend/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/opcache-reset/advanced/)

## Đánh giá

 4 trên 5 sao.

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

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## Những người đóng góp

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

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/opcache-reset/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](https://github.com/sponsors/dvershinin)