{"id":86451,"date":"2018-06-01T07:40:53","date_gmt":"2018-06-01T07:40:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/opcache-reset\/"},"modified":"2025-12-15T03:33:07","modified_gmt":"2025-12-15T03:33:07","slug":"opcache-reset","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/opcache-reset\/","author":14041782,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.4.0","stable_tag":"2.4.0","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"OPcache Reset","header_author":"Danila Vershinin","header_description":"Automatic reset of OPcache","assets_banners_color":"302d80","last_updated":"2025-12-15 03:33:07","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/github.com\/sponsors\/dvershinin","header_plugin_uri":"http:\/\/wordpress.org\/plugins\/opcache-reset\/","header_author_uri":"https:\/\/www.getpagespeed.com\/","rating":4,"author_block_rating":0,"active_installs":300,"downloads":7704,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"dvershinin","date":"2018-10-23 22:14:18"},"2.0.0":{"tag":"2.0.0","author":"dvershinin","date":"2018-10-23 22:28:12"},"2.0.1":{"tag":"2.0.1","author":"dvershinin","date":"2018-12-09 07:57:26"},"2.1.0":{"tag":"2.1.0","author":"dvershinin","date":"2021-07-15 14:27:32"},"2.1.1":{"tag":"2.1.1","author":"dvershinin","date":"2021-07-15 14:27:32"},"2.1.2":{"tag":"2.1.2","author":"dvershinin","date":"2021-07-15 14:29:26"},"2.1.3":{"tag":"2.1.3","author":"dvershinin","date":"2021-09-05 09:58:39"},"2.1.5":{"tag":"2.1.5","author":"dvershinin","date":"2021-09-05 09:58:39"},"2.1.6":{"tag":"2.1.6","author":"dvershinin","date":"2021-09-06 08:45:33"},"2.1.7":{"tag":"2.1.7","author":"dvershinin","date":"2022-08-31 00:00:10"},"2.1.8":{"tag":"2.1.8","author":"dvershinin","date":"2024-05-09 15:41:23"},"2.1.9":{"tag":"2.1.9","author":"dvershinin","date":"2024-05-08 00:00:12"},"2.2.0":{"tag":"2.2.0","author":"dvershinin","date":"2025-12-03 00:00:52"},"2.3.0":{"tag":"2.3.0","author":"dvershinin","date":"2025-12-14 21:26:36"},"2.4.0":{"tag":"2.4.0","author":"dvershinin","date":"2025-12-15 03:33:07"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":"1","5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3419574,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3419574,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":3419574,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3419574,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3419574,"resolution":"772x250","location":"assets","locale":""},"banner.svg":{"filename":"banner.svg","revision":3419574,"resolution":false,"location":"assets","locale":false}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","2.0.0","2.0.1","2.1.0","2.1.1","2.1.2","2.1.3","2.1.5","2.1.6","2.1.7","2.1.8","2.1.9","2.2.0","2.3.0","2.4.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[146,47179,662,4574,47178],"plugin_category":[52],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-86451","plugin","type-plugin","status-publish","hentry","plugin_tags-cache","plugin_tags-opcache","plugin_tags-php","plugin_tags-wp-cli","plugin_tags-zend","plugin_category-performance","plugin_committers-dvershinin"],"banners":{"banner":"https:\/\/ps.w.org\/opcache-reset\/assets\/banner-772x250.png?rev=3419574","banner_2x":"https:\/\/ps.w.org\/opcache-reset\/assets\/banner-1544x500.png?rev=3419574","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/opcache-reset\/assets\/icon.svg?rev=3419574","icon":"https:\/\/ps.w.org\/opcache-reset\/assets\/icon.svg?rev=3419574","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin clears OPcache after updating WordPress core, themes, and files.\nUnlike other plugins, it is also compatible with <a href=\"https:\/\/www.getpagespeed.com\/server-setup\/performance-friendly-wordpress-updates\">WordPress updates made by Linux cron<\/a>.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Automatic OPcache reset after plugin\/theme\/core updates<\/li>\n<li>Clears both memory-based and file-based OPcache<\/li>\n<li>Works with cron-based WordPress updates (CLI context)<\/li>\n<li>WP-CLI commands for manual OPcache management<\/li>\n<li>Zero external dependencies (optional cachetool support)<\/li>\n<\/ul>\n\n<h3>Configuration<\/h3>\n\n<p>The plugin works automatically for web-based updates. For CLI-based updates (cron, WP-CLI), configure your PHP-FPM socket:<\/p>\n\n<p><strong>Option 1: Create <code>.cachetool.yml<\/code> in your WordPress root:<\/strong><\/p>\n\n<pre><code>adapter: fastcgi\nfastcgi: \/run\/php-fpm\/www.sock\n<\/code><\/pre>\n\n<p><strong>Option 2: Use cachetool binary<\/strong> (if installed in PATH)<\/p>\n\n<h3>WP-CLI Commands<\/h3>\n\n<p>Reset OPcache from the command line:<\/p>\n\n<pre><code>wp opcache reset\n<\/code><\/pre>\n\n<p>Show OPcache status and statistics:<\/p>\n\n<pre><code>wp opcache status\n<\/code><\/pre>\n\n<p>Output status as JSON:<\/p>\n\n<pre><code>wp opcache status --format=json\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>2.4.0<\/h4>\n\n<ul>\n<li>Added WP-CLI commands: <code>wp opcache reset<\/code> and <code>wp opcache status<\/code><\/li>\n<li>Added direct FastCGI communication (no cachetool dependency required)<\/li>\n<li>Added support for cachetool.yml configuration format<\/li>\n<li>Added end-to-end FastCGI testing<\/li>\n<li>Improved test coverage (34 tests)<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Added comprehensive Docker-based integration test suite (27 tests)<\/li>\n<li>Added GitHub Actions CI for linting and testing<\/li>\n<li>Added PHPStan and PHPCS for code quality<\/li>\n<li>Improved OPcache reset verification with validate_timestamps=0 testing<\/li>\n<li>Added pre-commit hooks for automated code checks<\/li>\n<li>Updated plugin assets (icons, banners)<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Added support for file-based OPcache clearing with race condition handling<\/li>\n<li>Improved cachetool invocation with proper PATH handling<\/li>\n<\/ul>\n\n<h4>2.1.2<\/h4>\n\n<ul>\n<li>No calling cachetool opcache:reset for setups with only file cache<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Handle file OPcaches in a consistent fashion<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Handle file OPCaches<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Automatic OPcache reset for WordPress. Invalidates both in-memory and file-based OPCache upon upgrading WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/86451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=86451"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dvershinin"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=86451"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=86451"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=86451"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=86451"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=86451"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=86451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}