Title: OPcache Reset
Author: Danila Vershinin
Published: <strong>1 ມິຖຸນາ 2018</strong>
Last modified: 1 ກັນຍາ 2026

---

ຄົ້ນຫາປລັກອິນ

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

[ດາວໂຫຼດ](https://downloads.wordpress.org/plugin/opcache-reset.2.4.3.zip)

 * [ລາຍລອຽດ](https://lo.wordpress.org/plugins/opcache-reset/#description)
 * [ການຣີວິວ](https://lo.wordpress.org/plugins/opcache-reset/#reviews)
 * [ການພັດທະນາ](https://lo.wordpress.org/plugins/opcache-reset/#developers)

 [ການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/opcache-reset/)

## ຄຳອະທິບາຍ

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

## ການຣີວິວ

![](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 ພຶດສະພາ 2019

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

 [ ອ່ານການຣີວິວທັງໝົດ 1 ລາຍການ ](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ ແລະ ຜູ້ພັດທະນາ

“OPcache Reset” ແມ່ນຊອຟແວໂອເພັນຊອດ (Open Source). ບຸກຄົນຕໍ່ໄປນີ້ໄດ້ມີສ່ວນຮ່ວມໃນການ
ພັດທະນາປລັກອິນນີ້.

ຜູ້ຮ່ວມພັດທະນາ

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

“OPcache Reset” ໄດ້ຖືກແປເປັນ 1 ພາສາທ້ອງຖິ່ນ. ຂໍຂອບໃຈ [ທີມງານຜູ້ແປ](https://translate.wordpress.org/projects/wp-plugins/opcache-reset/contributors)
ສຳລັບການປະກອບສ່ວນຂອງເຂົາເຈົ້າ.

[ແປ “OPcache Reset” ເປັນພາສາຂອງເຈົ້າ.](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)

### ສົນໃຈຮ່ວມພັດທະນາບໍ່?

[ເບິ່ງລະຫັດ](https://plugins.trac.wordpress.org/browser/opcache-reset/), ກວດເບິ່ງ
[ຄັງເກັບ SVN](https://plugins.svn.wordpress.org/opcache-reset/), ຫຼື ຕິດຕາມ [ບັນທຶກການພັດທະນາ](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).

## ບັນທຶກການປ່ຽນແປງ

#### 2.4.3

 * Exclude development tooling files that leaked into the 2.4.2 release package

#### 2.4.2

 * Fix PHP warning `pack(): 1 arguments unused` in the FastCGI BEGIN_REQUEST builder,
   which made every WP-CLI cron run produce output

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

 *  ເວີຊັນ **2.4.3**
 *  ອັບເດດຫຼ້າສຸດເມື່ອ **1 ອາທິດ ທີ່ຜ່ານມາ** ທີ່ຜ່ານມາ
 *  ການຕິດຕັ້ງທີ່ໃຊ້ງານຢູ່ **500+**
 *  ເວີຊັນ WordPress ** 5.0 ຫຼື ສູງກວ່າ **
 *  ທົດສອບເຖິງເວີຊັນ **7.1**
 *  ເວີຊັນ PHP ** 7.4 ຫຼື ສູງກວ່າ **
 *  ພາສາ
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/opcache-reset/) ແລະ [English (US)](https://wordpress.org/plugins/opcache-reset/).
 *  [ແປເປັນພາສາຂອງເຈົ້າ](https://translate.wordpress.org/projects/wp-plugins/opcache-reset)
 * ແທັກ
 * [cache](https://lo.wordpress.org/plugins/tags/cache/)[OPcache](https://lo.wordpress.org/plugins/tags/opcache/)
   [php](https://lo.wordpress.org/plugins/tags/php/)[wp-cli](https://lo.wordpress.org/plugins/tags/wp-cli/)
   [Zend](https://lo.wordpress.org/plugins/tags/zend/)
 *  [ມຸມມອງຂັ້ນສູງ](https://lo.wordpress.org/plugins/opcache-reset/advanced/)

## ການໃຫ້ຄະແນນ

 4 ຈາກທັງໝົດ 5 ດາວ.

 *  [  ການວິຈານ 5 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=5)
 *  [  ການວິຈານ 4 ດາວ ຈຳນວນ 1 ລາຍການ     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=4)
 *  [  ການວິຈານ 3 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=3)
 *  [  ການວິຈານ 2 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=2)
 *  [  ການວິຈານ 1 ດາວ ຈຳນວນ 0 ລາຍການ     ](https://wordpress.org/support/plugin/opcache-reset/reviews/?filter=1)

[ການທົບທວນຂອງທ່ານ](https://wordpress.org/support/plugin/opcache-reset/reviews/#new-post)

[ເບິ່ງທັງໝົດ ການຣີວິວ](https://wordpress.org/support/plugin/opcache-reset/reviews/)

## ຜູ້ຮ່ວມພັດທະນາ

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

## ການຊ່ວຍເຫຼືອ

ບັນຫາທີ່ໄດ້ຮັບການແກ້ໄຂໃນສອງເດືອນຜ່ານມາ:

     1 ຈາກ 1

 [ເບິ່ງຟໍຣັມການຊ່ວຍເຫຼືອ](https://wordpress.org/support/plugin/opcache-reset/)

## ບໍລິຈາກ

ເຈົ້າຕ້ອງການສະໜັບສະໜູນການພັດທະນາຂອງປລັກອິນນີ້ບໍ່?

 [ ບໍລິຈາກໃຫ້ປລັກອິນນີ້ ](https://github.com/sponsors/dvershinin)