5th August 2023
Are you see an “Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” message when trying to log into your WordPress dashboard?
This error can occur for a few reasons, which don’t necessarily include cookies being blocked or not supported by your browser. We’ve personally experienced this error before, even when cookies were definitely not disabled in our browsers.
This error can frequently come up due to an issue on the page. A simple refresh of the page can often fix this issue.
If you’re still seeing the cookies are blocked or not supported by your browser error, please read on.
If you have recently installed a caching or security plugin on your site, then this should be the first place to check.
Caching plugins will cache and minify the site, which can either result in cookies not being generated in the first place or they might not work the way that they should.
To fix the “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” error, we recommend disabling your caching and security plugins, and seeing if you can log into your WordPress admin dashboard.
Is your site unoptimised and doesn’t have caching? You could speed it up tenfold with the right optimisations! Speak to our WordPress experts.
If you’ve recently migrated your website to another hosting provider, while the domain stayed the same, existing cookies might no longer work with your new site.
If fix number one didn’t work, then try clearing your cookies and site data for your browser. Below are a few links on how to do this:
Could you benefit from better and faster hosting? Take a look at our hosting packages.
If neither solution works, try this more technical fix. You’ll need some technical/coding knowledge to add this code in.
First of all, you’ll need to open your website’s function.php file. Then add the following code:
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
and then save/upload your functions.php file.
Thanks to the WordPress Support Forum thread by mirajas, this code will set the WordPress test cookie, which checks if your browser has cookies.
One of the above always seems to fix the blocked cookies error in WordPress for us. If you’re still having problems, you may want to consult WordPress fix experts to look into your code and setup.
Related Posts