SAJIBDIGITAL | Web Design and Development Company in Bangladesh

Error “Cookies are Blocked or Not Supported by Your Browser”

In the development process errors are common. Today we will know about “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” This is one of the common WordPress problems at this time.

This error you can see when you log in to your WordPress website. In this article, we explain some processes to fix WordPress “Cookies Block” Errors.

Error “Cookies are Blocked or Not Supported by Your Browser”
error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

What are cookies?

A cookie is a small piece of text sent to your browser by a website you visit. It helps the site remember information about your visit, which can make it easier to visit the site again and make the site more useful to you.

What does it mean when cookies are blocked?

If you block cookies, some web pages might not work. Here are some examples: You will likely not be able to sign in to a site even when using your correct username and password. You might see a message that cookies are required or that your browser’s cookies are off. Some features on a site might not work.

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

This error message (“ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”) does not mean that it has been displayed due to blocked cookies. You may see this error message due to a security issue, or cache plugin on your site, and a change in your server / IP address after your site’s moved to another host.

Sometimes, just refreshing the browser fixes this error.
If refreshing the browser does not resolve the error, Implement the following possible corrections:

Reasons for the Error: Cookies are Blocked or Not Supported by Your Browser

There are some possible reasons to see cookie errors when you try to log in to your WordPress Website. Below you will find the three most popular reasons. We can fix them quickly.

WordPress Login Error Caused by Old version WordPress CMS, Theme, and Plugins

Most of the time I found cookie issues from the Old Version of WordPress CMS, Theme, and Plugins.

Old files create bugs and security issues. In some cases, I found Dozens of installed themes, hundreds of plugins. Most of the plugins are not activated or not optimized.

Un Update themes or plugins can create error issues. So, we have to install the theme or plugin carefully.

WordPress Login Error Caused by Security or Cache Plugin

Sometimes login problems occur due to security and cache plugins. As a result, you will see ERROR: “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. ”

To fix this, rename the plugin folder and temporarily disable security and cache plugins. To do this, login to your website via FTP or a file manager plugin, and then change the specified folder /wp-content/plugins/plugin-name to something else.

Then try to log in again to the WordPress website. If you fix your issue, reinstall the plugins one by one again. This will help you determine which plugin is causing the problem.

“WordPress Not Supported Cookies Error” after Changing the Server or Hosting Service

Sometimes, “WordPress Not Supported Cookies Error” occurs after changing the Hosting server. And migrate your site to another domain. So, Delete your browser cookies and try again to log in to your WordPress website.

Fix “WordPress Enable Cookies Error” by Editing the File wp-config.php

To correct this error, you need to paste two lines of code in this space. You can access the wp-config.php file via FileZilla in the root folder of your website. Paste the following code below before saying this
/* That’s all, stop editing!…*/.

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

Also, try this one:

define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );

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

Another Possible Method to Fix “Cookies are Blocked or Not Supported” Error by Editing the file functions.php

If your problem has not been solved yet. Then, you can try it.

There is three-step to follow:

Step 1: Go to the theme folder and Edit the File functions.php

You can access this file using the cPanel file manager. After login, open the functions.php file in this direction: wp-content/themes/theme-name/functions.php

Step 2: Add Code to the File functions.php

Add the following line of code at the bottom of the file 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);

Also, try this one:

if ( SITECOOKIEPATH != COOKIEPATH ) {
setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
}

Step 3: Save the functions.php File

After saving functions.php on your website, you will no longer see the error “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

Fix “Cookies are blocked or not supported by your browser” Error by Reactivate the use of cookies

In some cases, “cookies blocked” errors occur in WordPress because they are not specially enabled in your browser. If they are not implemented, logging in to WordPress may present a problem.

This can happen when your browser does not find the site’s authentication protocol. We can solve this in 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.

Another Method Delete the .htaccess file

Another possible method is to delete the .htaccess file. Before deleting the .htaccess file create a backup copy then delete the file. If it works, save the permalink and it will create a new .htaccess file.