To take full advantage of these tools, it is also essential to understand some of their key components, such as cookies, present on virtually all websites that target the optimization of visits and conversion.
However, when you log in, you may see an error message from biscuits in WordPress saying they are blocked. At first glance, this often seems like a big deal, but it’s almost never a big deal. You just have to know the right way to solve it!
To help you, we’ll explain how to do this.
In this article you will see:
Read on and understand everything you need to know on the subject!
What are cookies ?
When you enter a website, a small temporary file is automatically downloaded to your browser called a cookie. Usually, this is a text file that takes up hardly any space on your computer and does not affect your browsing experience.
Its function is to act as a log of key navigation information and user profile like your location, age, and browsing history. With this data, you can better understand your potential customers and optimize marketing campaigns, content, and other actions.
Why are cookies blocked?
Unfortunately, it is difficult to identify a single cause of the cookie error in WordPress without having all the context. Ultimately, there are a lot of things that can cause it to crash, from a misconfiguration in the SSL certificate to a corrupted important file.
In general, identifying the most likely cause is often part of the problem-solving process. Likewise, the blocking may be the result of a protocol from a security plugin.
This is more common when the cookie in question has harmful behavior – such as capturing login data – or when the plugin has a problem.
How to fix the blocked cookies error in WordPress?
Whatever the root cause of the error, once identified, it is not that difficult to resolve. Even if you are in doubt, there are some methods you can use to resolve this situation. Know the main ones and how they are performed.
Define the domain
First, try refreshing the page to make sure it was not a specific error in the execution of the code. If that doesn’t work, the problem may be in defining the domain used in your cookie.
To fix this, you need to go to the wp-config file on your computer and add the following line of code:
- // Define the cookie domain for connection cookies
- define (‘COOKIE_DOMAIN’, ‘.domain.com’);
In the part where “domain.com” is written, you must put the domain of your website, so that the cookie can find it. Don’t forget to put the code before “/ * That’s all, stop editing! Good blog. * / ”, Which indicates the end of the file.
Another possible method, but not ideal, would be to skip the installation of cookies on the site, allowing you to log in without having to use them until you fix the problem permanently.
To achieve this, you need to access your WordPress theme’s functions.php file 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 bit difficult to make changes to PHP safely. So to make things easier, we recommend that you download the Code Snippets plugin. This resource allows you to make these additions more easily and also allows you to manage each of them. So when you need to, you can disable these lines of code separately.
In some cases, the WordPress cookie error occurs because they are not specifically enabled in your browser. If they can’t work, your WordPress connection may have a problem.
This can happen when your browser cannot find the site’s authentication protocols. Fortunately, this can be solved by following four steps:
- Access your PHPMYADMIN;
- Open the WP-OPTIONS table 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 they are both the same.
That should fix the problem.
In addition to the alternatives listed above, you can use other small procedures that do not require such a detailed explanation. Here is a list of the most interesting options:
- Delete the .htaccess file and create a backup. If that works, save the permalink to create a new file;
- check that your SSL plugins redirect correctly to HTTPS;
- Rename your plugins folder so that they are disabled, then enable them one at a time. This corrects the error in case it is caused by a security plugin;
- Rename the folder with WordPress and theme files to revert to default settings. If this fixes the problem, delete the folder and reinstall the theme. It’s rare, but cookie errors in WordPress can be caused by your theme.
With this information, you already have a few ways to resolve blocked cookie errors in WordPress and normalize your access. But, if they persist, a good alternative is request technical help or platform support.
Minimize the likelihood of similar problems occurring by reading our article on main WordPress errors and get more knowledge on this topic.