Skip to content

CDN cached my WordPress admin and now I can't log in

Web Hosting by lee_mcr 3 replies 176 views
#1

Right then, I've proper gone and done it. Set up Vultr's CDN last night, thought I was being clever with a Page Rule that caches "everything." Now /wp-admin serves a cached login page, I submit credentials, and... nothing. Cookie gets set, page refreshes to cached login again. Infinite loop of sadness.

Tried purging cache. Tried browser incognito. Tried shouting at monitor.

Cheers lads, how do I un-break this without disabling the whole zone?

Honey badger don't care... about downtime
#2

Your Page Rule likely matches `*example.com/*` with Cache Level: Everything. WordPress admin requires explicit cache bypass for cookie-bearing requests.

Correct approach:

  • Cache bypass: `*example.com/wp-admin*`
  • Cache bypass: `*example.com/wp-login.php`
  • Dynamic content: match on `wordpress_logged_in` cookie presence
  • Origin-Cache-Control: respect `Cache-Control: no-store` headers

Also ensure your origin sends proper headers. Many WordPress installs default to no cache directives, relying on the CDN to be intelligent. It is not.

iBGP, eBGP, don't care, just peer
#3

I did the exact same thing with cloudflare once, page rules are a trap

#4

Shouting at the monitor usually helps though, no?

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft