Hi @kloddant,
Thank you for the candid feedback — we really appreciate you taking the time to share this.
You’re absolutely right that W3 Total Cache adds define('WP_CACHE', true); and updates .htaccess during activation. This behavior exists because WordPress page caching relies on the core WP_CACHE constant and early bootstrap loading to function correctly
Any plugin that provides full page caching must use the native WordPress WP_CACHE constant because WordPress only enables early cache loading when this constant is set. This isn’t specific to W3 Total Cache — it’s how WordPress core page caching works.
As a workaround there is an option to prevent automatic file changes by making wp-config.php and .htaccess read-only before activating the plugin. This allows W3TC to run without modifying tracked files, while you keep full control of constants and rules inside version control.
Is this something you could find as the best approach in this case?
Thanks!
Hello, thanks for the reply! What you are saying makes sense. I could make these files read-only, and perhaps that is what I will do, but I’d rather not introduce another environment configuration dependency if I could avoid it. Would it be possible for you guys to modify the plugin so that it only checks the WP_CACHE variable at plugin activation, rather than on each pageload? And/or perhaps just use a warning message to tell the user to modify this constant themselves, rather than directly having the plugin modify it? If the plugin only modified the constant upon activation, then all I would need to do would be to activate the plugin and revert the changes to the wp-config file it makes.