W3TC nginx.confix bug


Related to: https://rtcamp.com/easyengine/docs/#comment-122769

Two testing cases: (server and installation are the same)

  • ee site create mysite1.com --wpsubdir
    Manually installed w3tc plugin through Add New Plugin option in the WP dashboard and - what a suprise - it function totally normal, based on the test you suggested with the timestamp.
    It really surprised me because w3tc rewrite rules are in the nginx.conf at htdocs folder and it should not work with the EE configuration.

  • ee site create mysite2.com --wpsubdir --w3tc
    Everything OK, but I understand that page cache works with the pre loaded EE configuration (wich is perfect and nice but not for all cases) and whatever I change in W3 page cache option not gonna have effect.

  • ee site create mysite3.com --wpsubdir --wpfc
    Everything is perfect, but I’m sure you have a bug in your Nginx-Helper plugin. It doesn’t purge (automatically) all the post and pages when you create a new post when the plugin is set to do this. You should do it manually with the big button.

  1. W3TC may work but your page-cache may not work. It will not pass cache test here - https://rtcamp.com/wordpress-nginx/tutorials/checklist/ (one where you shut down PHP/MySQL and see if pages can be loaded from cache)

  2. Yes. Page-cache and browser-cache related setting changes will not work. We don't recommend w3tc for page-caching or browser-caching so we don't have plan to invest more time on this as of now. But you can edit EasyEngine generated site config (ee site edit) to include nginx.conf in it with "some changes".

  3. This is not a bug. Nginx-helper is NOT supposed to purge entire cache automatically. On large site, purging unwanted cached part might result in spike. There is "Purge Cache" button in admin-bar which can be used to purge entire cache manually. An option can be added in nginx-helper purge settings to "Purge entire cache" whenever a post is published/edited. You can leave a suggestion on GitHub repo - https://github.com/rtCamp/nginx-helper . A contributor might send pull-request. If you are a developer, you can send a pull-request as well.