• 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://www.ads-software.com/plugins/w3-total-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kingjeffrey

    (@kingjeffrey)

    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

    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.

    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.