If you have a caching plugin installed on your WordPress website, chances are that you will experience a “Cookies Blocked” error message while trying to log into the WordPress admin dashboard at some point in your life. I’ve seen this since we begin implementing caching and security plugins more heavily on our websites. Honestly, I haven’t narrowed the problem down to the point where I know exactly which plugin or setting is causing the issue. I have, however, found two quick methods for how to fix a “cookies blocked” error on WordPress admin dashboard.
If you’re seeing this alert, this article may be for you:
Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
I don’t believe the problem is actually that cookies are blocked by your browser — I use Chrome for Mac and cookies are not being blocked. I think that WordPress is looking for a test cookie, which is being blocked or not shown by the caching plugin. Could be wrong here, but that’s my current theory.
Cookies Blocked Error Quick “Fix” #1
I read many forums where people described elaborate methods of getting into their WordPress admin dashboard after seeing the “Cookies Blocked” error message. Some people uninstalled and reinstalled WordPress, reinstalled all their plugins, paid wild amounts to developers, etc.
If you’re just trying to get into your site in a hurry (drumroll please)… hit refresh.
I’ve been able to get into every one of my website dashboards after seeing this message, simply by refreshing the browser. Somehow, the cookie that was missing is then picked up and you are allowed in. Voila!
Cookies Blocked Error “Permanent” Fix
Now, the first solution doesn’t remove the error. However, this solution will:
- Access your Functions.php file (use an FTP tool such as Filezilla or CyberDuck, or go through the file manager in your hosting cPanel)
- Add the following code to the bottom of the functions.php file:
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
- Upload/Save your Functions.php file
Code thanks goes out to @mirajas and the beautiful people on this WordPress Support Forum Thread: Cookie Error When Logging In
I’m not seeing the error any longer and I expect that you’ll have the same result. That said, I don’t believe this “solution” is even an actual “permanent fix” because, really, the only fix is for either the plugin developers to adjust their code, or WordPress to acknowledge this and make an adjustment for it in the core.
Currently, I’m on WordPress 4.4.2. Maybe we’ll see this fix unnecessary in future updates.
Let me know if this fix works/doesn’t work and I’ll go find a forum where someone smarter than I has a solution 😉
For more helpful blog posts like this check out:
- Change Active Menu as you Scroll with JQuery
- Shorten the Length of the Border-Bottom with Pure CSS
- How to Reduce the Size of you Webpage