How to fix “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

Recently migrated a site from one server to another using the awesome ManageWP dashboard, but was unable to login after the cloning was complete.

Using credentials I knew were correct, I kept receiving the message “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” This, despite having cookies enabled in Chrome. There are some other possible causes of this message, but check this first if you’ve encountered the same issue.

First check WP-CONFIG.PHP

After disabling all plugins and active theme, I was still unable to login, so I took a closer look at WP-CONFIG.php. At the top was a line added by the popular W3 Total Cache plugin still referencing the old domain. Removing this line (and the odd paragraph symbols indicating invalid line endings) I was able to login without the message.

define('COOKIE_DOMAIN', ''); // Added by W3 Total Cache


You’ll need FTP access to edit WP-CONFIG.php. Be sure to check out other possible causes of this message if it persists.


If you found this useful, be sure to click “Like” on this post and follow us on Facebook and Twitter.

  • kenville

    I’ve encountered this a couple times, and it’s never been a caching issue in my cases. It’s not even been a cookie issue and therefore none of the fixes related to adding code to core files (never a good idea) work.

    I fixed it once before and desperately wish I could remember how. Maybe I just abandoned domain mapping …

    • Interesting. Yeah, the more I looked into this I believe the issue is most likely related to permissions in general. In this case, W3 Total Cache defined its cookie domain using a different line ending format than what’s native to wp-config.php. (Those red paragraph symbols indicate the different format.) While file and folder permissions checked out in this case, those line endings prevented removal of the definition upon deactivation/deletion of the plugin. A unique situation, but ultimately related to what could and couldn’t be written.

      In your case, did you try resetting file and folder permissions like below?
      sudo find . -type f -exec chmod 644 {} +
      sudo find . -type d -exec chmod 755 {} +