Varnish with WordPress

I gave it a punt and it seems to be OK. Below is my VCL. It basically unsets all cookies unless it’s wp-admin. This will only work for a very simple site. # Specific to my.website.com if (bereq.http.host == “my.website.com”) { # Strip all cookies (the only one should be PHPSESSID) if not admin if … Read more

Prevent WordPress from sending Cache-control http header

Thanks to @chrisguitarguy’s answer, you can control the http headers sent by WordPress via the “send_headers” hook. Here is the function I added to my theme’s functions.php file, and that solved the issue with the Varnish server. function varnish_safe_http_headers() { header( ‘X-UA-Compatible: IE=edge,chrome=1’ ); session_cache_limiter(”); header(“Cache-Control: public, s-maxage=120”); if( !session_id() ) { session_start(); } } … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedusedusedueduedusedusedu