Cookies Blocked? Learn how to solve this error on WordPress

TL;DR

WordPress shows “Cookies are blocked or not supported” when it cannot set its wordpress_test_cookie or auth cookies at login. Fix browser cookie settings, plugin conflicts, COOKIE_DOMAIN mismatch, HTTPS consistency, or login-page caching before you rewrite theme code.

  • Why it matters: A blocked test cookie stops admin login even when your password is correct.
  • How it works: WordPress probes cookie support with wordpress_test_cookie, then relies on auth cookies for the session.
  • Zoom in: Defining COOKIE_DOMAIN in wp-config.php is one article-backed fix when the domain on the cookie is wrong.
  • Reality check: Security plugins, ad blockers, and page caches can mimic a "blocked cookies" failure.
  • The bottom line: Isolate the cause with browser/incognito and plugin disables, then apply the matching fix.

Are you getting the cookies blocked error on your WordPress?

Thanks to digital technology and the greater presence of mobile devices on a daily basis, more and more people use the internet as a source of information and to interact with brands.

That is why it is so important to develop a secure website for your business and build a strong online presence, especially through platforms such as WordPress.

To make the most out of these tools, it is also essential to understand some of their main components, such as cookies. They are present in basically all websites to optimize access and conversion.

However, you may see an error message on WordPress when you sign in, stating that cookies are blocked. Although it seems like a big problem, it rarely is that serious. You just need to know the right way to solve it. To help you with that, we’ll explain how to do this.

In this article, you will see:

Keep on reading to understand everything you need to know about the topic!

Neste post 3

What are cookies?

As you access a website, it automatically downloads a small and temporary file to your browser, which is an HTTP cookie. In general, it’s a text file that nearly takes up any space in your computer and does not get in the way of your browsing.

Its purpose is to act as a record of key navigation information and the user’s profile, such as their location, age, and browsing history. With this data, you can gain a deeper understanding of your leads and optimize marketing campaigns and content, among other things.

Why do cookies get blocked?

Unfortunately, it is hard to pinpoint one single cause for the “cookies are blocked” error on WordPress without the entire context. Many things can lead up to their blocking, from a configuration error in the SSL certificate to an important corrupted file.

Generally, identifying the most likely cause is part of the process of solving this problem. Also, the blocking may be the result of some security plugin protocol.

This is more common when the HTTP cookie in question presents some harmful behavior, such as capturing login data, or when the plugin itself presents some issue.

Even browser extensions or privacy settings might get in the way. Something as simple as running a strict ad blocker, privacy extension, or a browser set to block all third-party cookies can break the login process. It’s worth doing a quick test in a different browser or using incognito mode—sometimes, that’s all it takes to spot what’s tripping things up on your end. If the problem magically disappears in incognito, well, you know to take a closer look at your browser’s add-ons or settings.

On rare occasions, hosting providers enforce extra security protocols behind the scenes that mess with how cookies are handled. A managed host might implement firewall rules or caching layers that scramble authentication cookies without much warning. If you’ve just migrated your WordPress site or your host has rolled out an update that coincides with these login problems, don’t rule out that something changed at the server level. Checking your hosting provider’s documentation or reaching out to their support could save you hours of pointless tinkering on WordPress itself.

How to solve the “cookies are blocked” error on WordPress?

Whatever the cause of the error may be, once it is identified, it is not so difficult to solve. Even in doubt, there are still some methods you can apply to solve this situation. Check out the main ones and how they are executed.

Set the domain

First, just try to refresh the page to make sure it was not a one-time error in the code’s execution. If that does not work, the problem may be in the definition of the domain used in your cookie.

To solve this, you must access the wp-config file on your computer and add the following line of code:

  • // Set cookie domain for login cookies
  • define( ‘COOKIE_DOMAIN’, ‘.domain.com’ );

Where you read “domain.com”, you must insert your website’s domain itself, so that the cookie can find it. Remember to put the code before the line “/ * That’s all, stop editing! Happy blogging. * / “, which indicates the end of the file.

Ignore cookies

Another possible method, yet not ideal, would be to ignore the setup of cookies on the website, allowing you to log in without them while you do not solve the problem permanently.

To do this, you must access the file functions.php on your WordPress theme and add the following line of code:

  • setcookie(TEST_COOKIE, ‘WP Cookie check’, 0, COOKIEPATH, COOKIE_DOMAIN);
  • if ( SITECOOKIEPATH != COOKIEPATH ) setcookie(TEST_COOKIE, ‘WP Cookie check’, 0, SITECOOKIEPATH, COOKIE_DOMAIN);

It can be a little difficult to make changes to PHP safely. So, to make things easier, it is recommended to download the plugin Code Snippets. It allows you to make these additions more easily and also manage each one. That way, when you need to, you can disable these lines of code separately.

Reactivate the use of cookies

In some cases, the “cookies are blocked” error on WordPress occurs because they are not specifically enabled on your browser. If they cannot be executed, the login to WordPress can present problems.

This can happen when your browser cannot find the site’s authentication protocols. Fortunately, this can be solved with four steps:

  • access your PHPMYADMIN;
  • open the table WP-OPTIONS in your database;
  • go to OPTION_VALUE, double-click and add the hosting protocol before your URL;
  • repeat the previous step on the next line so that both are the same.

This should do the trick.

Other methods

There are other several small possible procedures and they do not require such an in-depth explanation. Therefore, we have selected some of them as follows:

  • delete the .htaccess file and create a backup copy. If it works, save the permanent link and it will create a new file;
  • check if your SSL plugins are redirecting to HTTPS correctly;
  • rename your plugins folder so that they are all disabled and then activate each one at a time. This helps to solve the error if it was caused by a security plugin;
  • rename the folder with the theme files and WordPress will return to the default setting. If this solves the problem, delete the folder and reinstall the theme. It is rare, but the “cookies are blocked” error on WordPress can be caused by your theme.

With this content, you already have some ideas on how to solve the “cookies are blocked” errors on WordPress and normalize your access. However, if they persist, it is a good idea to seek technical help or contact the support from the platform.

To help avoid more problems like this one, study WordPress guides for corporate blogs and feel even more prepared to work with this platform.

Frequently Asked Questions

What does the WordPress cookies blocked error actually mean?

It means WordPress failed to write its temporary wordpress_test_cookie or related authentication cookies. Official docs show that failure as “Cookies are blocked or not supported by your browser.” Your password may be fine; the browser or server path for cookies is not.

How do you fix cookies blocked on WordPress login?

Enable cookies for the site, test in another browser or incognito, disable plugins, verify COOKIE_DOMAIN matches the site URL, keep HTTPS consistent, and exclude wp-login.php from page cache. The article also shows setting COOKIE_DOMAIN in wp-config.php when a refresh alone fails. Change one variable at a time so you know what restored login.

Can a security plugin cause the cookies blocked message?

Yes. The article notes security plugin protocols and corrupted or aggressive cookie handling among likely causes. Renaming the plugins folder to disable all plugins, then re-enabling one by one, is the isolation path it recommends. If login returns after a disable, leave the offending plugin off until you have a settings fix.

Is editing functions.php to ignore cookies a good fix?

The article offers that path as a temporary workaround and calls it not ideal. Prefer fixing browser settings, domain constants, HTTPS, and cache rules so normal cookie auth works again. Use code snippets only while you diagnose, then restore normal cookie authentication afterward.

MM Matt Montenegro