Programmatically disable W3 Total Cache in development environment [closed]

Caching plugins are very challenging to disable because on top of normal plugin functionality they tend to:

  • created extra drop-in files
  • set caching constants
  • bypass PHP completely with .htaccess

While it’s not impossible to mangle specific plugin into submission, it’s flaky. More reliable to explicitly disable it in dev and keep. Note that implicitly stopping plugin from loading might not even be enough thanks to leftover extras that are cleaned up only via proper deactivation routine.