Archived topic
Issue with login: "Cookies are blocked or not supported by your browser"
3 replies · Started by Enrique Garcia-Sayan on March 20, 2019
For a few days I have been getting the following error when logging-in:
"ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress."
This is strange because I don't have my browser set up to not accept cookies and i have tried in other computers with same result. The log in does proceed though and if I click home the wordpress dashboard appears, but this can be confusing and annoying for users. This may be a coincidence, but I noticed this after the last wordpress update.
Any thoughts on how to resolve this?
Thank you!
Hi there,
Does it still happen after you clear your browser cache?
It could be server caching as well.
Found some stuff here: https://wordpress.stackexchange.com/questions/166181/cant-log-in-error-cookies-are-blocked-or-not-supported-by-your-browser-you
Thank you, I tried some of these solutions without success, including deactivating and reactivating all plugins.
The one that finally worked is adding the following to functions.php:
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
if ( SITECOOKIEPATH != COOKIEPATH )
setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
Probably dumb question, but I just want to make sure that that's okay from the generatepress standpoint in terms of functionality, and the way my site will behave with cookies and security.
I'm not an expert when it comes to stuff like this, but it should be fine.
It might be worth checking with your hosting as well, as it shouldn't be necessary to do that.