How to Optimize Varnish Cache server for WordPress Blog.
For optimizing Varnish cache server for WordPress you need to tell varnish server, which pages of your site to cache and which one not to cache. You need to write rules to normalize URL’s, time to serve content from cache and much more. All is possible by using the Varnish VCL, Language, the more you optimize your varnish VCL more you can handle the traffic. Some points when using Varnish to Cache WordPress Blog. Don’t cache WP-admin, so you can Login to WordPress dashboard. Forward user IP to Backend Apache server so WordPress can obtain an origin IP in the comments instead of Varnish cache server IP address. Remove cookies from static pages so that Varnish can cache Pages Properly. Auto purge (Remove cached content) Varnish cache when someone comment or you publish new Post. Don’t cache WordPress Post preview, to keep that feature working. Don’t cache sitemap Page of your site, else when you purge your cache search engine bots again read your site whole sitemap . ...