Title: Version Control Dev Environment
Last modified: August 30, 2016

---

# Version Control Dev Environment

 *  [kingjeffrey](https://wordpress.org/support/users/kingjeffrey/)
 * (@kingjeffrey)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/version-control-dev-environment/)
 * I have a WordPress install that is deployed via Git to both development and production
   environments. I am able to configure W3 Total Cache for the production environment,
   and it works fine. But configured like this, it breaks in the development environment.
 * What is the recommended configuration for this type of deployment? Is there a
   way to leverage environment or server variables to disable this plugin in development
   environments?
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [kingjeffrey](https://wordpress.org/support/users/kingjeffrey/)
 * (@kingjeffrey)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/version-control-dev-environment/#post-6548240)
 * FYI, it fails because Memcache is not installed in my local environment, and 
   I really prefer to not have to hack MAMP every time PHP is updated.
 * Fatal error: Class ‘Memcache’ not found in /path/to/wp-content/plugins/w3-total-
   cache/lib/W3/Cache/Memcached.php on line 38
 *  [Gravitate](https://wordpress.org/support/users/gravitate/)
 * (@gravitate)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/version-control-dev-environment/#post-6548370)
 * Our team edits the wp-content/w3tc-config/master.php file to check for local 
   environment. Where you have dbcache.eneabled, pgcache.enabled etc, just make 
   the value conditional on the environment.
 * One issue we have is that this settings file can get updated if the Admin goes
   in the Plugin settings page. So we also usually lock that file by adding a redirect.
 *  [beerfan](https://wordpress.org/support/users/beerfan/)
 * (@beerfan)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/version-control-dev-environment/#post-6548383)
 * Gravitate, could you elaborate on your solution for locking the master.php file?
   Testing w3tc configurations in different environments has been a real challenge
   and I would love to implement a solution that abstracts out environment differences.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Version Control Dev Environment’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [beerfan](https://wordpress.org/support/users/beerfan/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/version-control-dev-environment/#post-6548383)
 * Status: not resolved