[wp-trac] [WordPress Trac] #36455: Call opcache_reset() after plug-in, theme or core update

WordPress Trac noreply at wordpress.org
Wed Dec 21 09:17:19 UTC 2016


#36455: Call opcache_reset() after plug-in, theme or core update
-------------------------------------+------------------
 Reporter:  nigro.simone             |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  4.8
Component:  Upgrade/Install          |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+------------------

Comment (by JanR):

 Currently I'm looking into our opcache configuration settings in PHP 5.6
 and 7, as we see more and more issues with WordPress updates lately too.

 To ease updates you can use the `upgrader_pre_install()` hook, and perform
 a flush of the cache. I've created a little Must Use Plugin [1] for this
 (it cannot be done from within a plugin when using
 `upgrader_pre_install()`).

 And don't forget OPcache's file path caches:
 http://php.net/manual/en/function.opcache-get-status.php.

 As long as tools like WP-CLI use native WordPress core functionality,
 there should be no problem adding such a flush function to the core.

 I'll get back when and if I found some valuable opcache settings
 administrators may need to set.

 [1] https://www.saotn.org/wordpress-plugin-flush-php-opcache/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36455#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list