Support » Plugins and Hacks » W3 Total Cache » [Plugin: W3 Total Cache] How to retain settings across git deployments

[Plugin: W3 Total Cache] How to retain settings across git deployments

  • I use PHPFog to host my WordPress sites, but this issue is also relevant on other hosts. I develop locally, then I use the Git version control system to deploy my changes to PHPFog. When I push to my remote repo, the Git client on my webserver automatically pulls the latest files.

    This works great for many things, but W3 Total Cache is not one of them. Every time I deploy changes to the server, I lose my W3 Total Cache settings. I can’t include my settings in the code repository, because my local configuration is different from my server config (e.g., no APC Opcode Cache installed locally). But of course, if I put the W3TC files in my .gitignore file so they aren’t deployed, then they are blown away on the server.

    What approach do you recommend for deploying via Git or via VCS scripts like Capistrano or Vlad the Deployer?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frederick Townes


    Can you deactivate W3TC locally, yet keep the production settings in the repo? That should work fine.

    Thanks, that worked for me.

    But before that I tried simply adding w3-total-cache-config.php and w3-total-cache-config-preview.php to .gitignore and that didn’t seem to do anything, my settings were still getting over-written. Any idea why?

    Plugin Author Frederick Townes


    If the files were not in your repo, I’m not sure how things could be overridden since they have to be edited on the file system or via the UI. Can you provide further detail?

    Actually the answer to my last question was that adding something to .gitignore doesn’t work retroactively. If your files were already in the repo, it doesn’t remove them.

    What would actually be really useful would be a list of the W3TC files that should be added to .gitignore, as well as a list of the files that need to be writable by the server.

    Or even better a “making W3TC work with PHPFog” guide! (one can always dream…)

    Plugin Author Frederick Townes


    The w3tc/* directory in addition to the settings and preview file need to be writeable by the server.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: W3 Total Cache] How to retain settings across git deployments’ is closed to new replies.
Skip to toolbar