SAJIBDIGITAL | Web Design and Development Company in Bangladesh
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.
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.
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.
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:
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.
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.
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.
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.
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.
If your problem has not been solved yet. Then, you can try it.
There is three-step to follow:
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
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);
}
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.”
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:
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.