You type the right username and password, press Log In, and WordPress answers "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." Your browser usually allows cookies fine. WordPress sets a small test cookie when it shows the login form, and the error means that cookie did not come back with your login. Here is how to tell why, and the fix for each case.
Open a private window in a different browser and log in there. If it works, clear the cookies for your site in the first browser (or turn off the extension that blocks them) and you are done. If it fails in every browser, the cause is on the site, and one of the cases below applies.
harborbakery.example but "WordPress Address" says https://www.harborbakery.example (or the other way round, or http against https), the cookie is set for one address and the login is checked on the other.wp-config.php and search for COOKIE_DOMAIN, COOKIEPATH or WP_HOME. A leftover line from an old domain, a staging copy or a multisite setup sends the cookie to a host your browser never visits.wp-login.php, click the first request). No Set-Cookie: wordpress_test_cookie line, or an x-cache: HIT / cf-cache-status: HIT line, means a cache is serving a stored copy of the login page without the cookie.WP_DEBUG_LOG and try again. A "Cannot modify header information - headers already sent" line means a plugin, theme or a stray space before <?php printed output early, so PHP could not send the cookie.define('WP_HOME','https://harborbakery.example'); and define('WP_SITEURL','https://harborbakery.example'); in wp-config.php with your real address, and redirect the other form to it at the host or CDN.define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); is the usual fix./wp-login.php and /wp-admin/ from the caching plugin and from the CDN (a Cloudflare cache rule "bypass" for those paths), then purge the cache.<?php (or after a closing ?>), re-save the file without a BOM, or update or disable the plugin it names.wp-content/plugins over FTP or the host's file manager, log in, then set it back up with the login address it expects.wordpress_. Ask the host to allow them rather than patching WordPress.| What you see | What it means | Usual fix |
|---|---|---|
| Works in another browser | This browser blocks or holds a bad cookie | Clear the site's cookies, allow them |
| Address bar and WordPress Address differ (www, https) | Cookie set for the other host | Make both addresses match, redirect the other |
| COOKIE_DOMAIN names an old or staging domain | Cookie sent to a host you never visit | Delete the line or set the current domain |
| No Set-Cookie on wp-login.php, cache HIT header | Login page served from cache | Bypass cache for wp-login.php and wp-admin |
| "Headers already sent" in debug.log | Output before the cookie | Remove stray whitespace, fix the named plugin |
wp-login.php to remove the cookie check. It comes back with the next update and hides the real fault.wp-config.php before editing it, so every change can be undone.Most cases are an address mismatch or a cached login page. If you still cannot log in, that is what the box below is for. Related: Login page keeps reloading, "Cannot modify header information", Too many redirects, Lost admin access.