For some reason Wordpress is setting "Set-Cookie" in the header of the entire site, this is telling my cache server not to cache the page, I tried to remove it via .htaccess, but it disabled the entire site and not I was able to log in more to the admin panel

How can I remove the "Set-cookie" from the http headers only on the frontend of my website? This is in the home, tags, search, blog, etc...

curl -I https://meusite.comHTTP/1.1 200 OK
Date: Sun, 12 Sep 2021 22:19:41 GMT
Set-Cookie: ppwp_wp_session=0000000000000000000000000000000000000000000000000 expires=Sun, 12-Sep-2021 22:49:41 GMT; Max-Age=1800; path=/
cache-Control: public s-maxage=230
Link: <https://meusiet.com/wp-json/>; rel="https://api.w.org/"
Link: <https://meusiet.com/wp-json/wp/v2/posts/1087>; rel="alternate"; type="application/json"
Link: <https://meusiet.com/?p=1087>; rel=shortlink
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
X-CACHE: miss
Alt-Svc: clear
  • 1
    WordPress isn't doing this, if I search for ppwp_wp_session aka ppwp, I get thousands of results for Password Protect WP. Either disable that plugin or contact their support for help
    – Tom J Nowell
    Sep 12, 2021 at 23:18
  • Thanks for your reply, however I don't use this plugin, I still can't find where this header comes from
    – Leonardo
    Sep 13, 2021 at 22:46
  • 1
    Solved The ProfilePress plugin that inserts Set-Cookie in the header, I disabled it, it works again
    – Leonardo
    Sep 13, 2021 at 23:04

1 Answer 1


I could see this being a really common issue for page speed where you don't want to lose the plugin, but you do want your homepage to rank well and come nice and fast from cache and it doesn't need various cookie wielding plugins breaking cache on the homepage.

If that was the case... could you just do a Snippet like...

if( is_homepage() ) { 

(pseudo code / untested)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.