Open csurtyoung opened 1 year ago
Hey @csurtyoung,
Thank you so much for creating this issue.
I'll take it to the dev team and discuss, we might look into using wp_opcache_invalidate_directory()
available since WP 6.2. (link)
Thanks, Jeroen. I'll stay tuned and definitely appreciate that you and your team are receptive to this suggestion.
Reopening the issue since the solution was reverted in 21.9.1
the opcache resetting for each subsite in a large multisite corrupts the cache. Variable letters start shifting, mostly in the require functions in wp-settings.php, which leads to white screen errors. Resetting the entire cache is a bit greedy. please stahp
[x] I've read and understood the contribution guidelines. [x] I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened
In wp-seo-main.php, function wpseo_init() contains the following code:
Especially in complex environments with many sites running Yoast and other PHP applications present, dumping cache for the entire server repeatedly is harmful and poor practice. We have tracked an intermittent server stability issue to Yoast updates.
Please consider replacing the opcache_reset() call with opcache_invalidate() applied to the plugin files only. If this is not possible, please consider adding an advanced configuration option that disables the opcache_reset() call.
Previous discussion of this issue is present in https://github.com/Yoast/wordpress-seo/issues/9315. The issue was closed without being resolved at that time (2018) despite complaint from several users.
Further information can be viewed in Wordpress.org support thread (https://wordpress.org/support/topic/yoast-updates-delete-opcache-for-non-yoast-and-non-wp-php-files/)
To Reproduce
Step-by-step reproduction instructions
Expected results
Actual results
Technical info
Used versions