Cookies are blocked 📝 WordPress

WordPress login: Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

WordPress’s test cookie wasn’t returned on login — often a siteurl/home or domain mismatch, caching of wp-login.php, or headers already sent.

Seen on: WordPress

Meaning

Despite the wording, the browser is rarely the problem. Mismatched cookie domain (www vs non-www), COOKIE_DOMAIN set wrongly, cached login pages, or a PHP warning output before headers prevents the cookie.

Common causes

  • siteurl/home domain differs from the URL used
  • COOKIE_DOMAIN misconfigured (multisite)
  • Page cache/CDN caching wp-login.php
  • PHP output before headers (headers already sent)
  • Browser actually blocking cookies

⚡ Quick fix

  1. Make siteurl/home match the login URL
  2. Remove or fix COOKIE_DOMAIN
  3. Exclude wp-login.php/wp-admin from caching; check for PHP warnings

Detailed fix by platform

WordPress

  1. php
    // wp-config.php — remove a wrong value or set correctly
    // define('COOKIE_DOMAIN', false);
    define('WP_HOME', 'https://example.com');
    define('WP_SITEURL', 'https://example.com');

How to diagnose

  1. Domains — Login URL vs siteurl
  2. Cache — wp-login cached?
  3. PHP — Warnings in debug.log?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.