Skip to content
wp staging logo
  • Videos
  • What’s New
  • Get Help
    • Documentation
    • Contact Support
    • Recommended Tools
    • Custom Development
    • Blog
  • Pricing
  • My Account
  • Download
  • EN
    • EN

How to fix the Error “Cookies are Blocked or Not Supported by Your Browser”

Errors are often part of the development process. Eventually, you will see the error message, “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.“

This error can occur when you log in to your WordPress website. This article explains a few solutions to the WordPress “enable cookies” error.

Error message: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress
This image shows the error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

Contrary to what the error message indicates, this message does not necessarily mean it appears because of blocked cookies.
You’ll often get that error due to the involvement of a security or cache plugin on your site or a change of your server/IP address after migrating your website to another host.

Sometimes, this error disappears by just refreshing the browser.
Implement the following possible fixes if the error does not go away.

Contents

  • Reasons for the Error: Cookies are Blocked or Not Supported by Your Browser
    • WordPress Login Error Caused by Security or Cache Plugin
    • “WordPress Not Supported Cookies Error” after Changing the Server or Hosting Service
  • Fixing “WordPress Enable Cookies Error” by Editing the File wp-config.php
  • Fix the error “Cookies are Blocked or Not Supported” by Editing the file functions.php
    • Step 1: Open and Edit the File functions.php
    • Step 2: Add Code to the File functions.php
    • Step 3: Save the File
    • Looking for the most trusted backup & staging WordPress plugin?Try out WP STAGING.
  • Related Posts

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

There are only a few possible reasons why your WordPress website throws a cookie error when you try to log in. Below are the two most popular reasons. Gladly, we can fix them quickly.

WordPress Login Error Caused by Security or Cache Plugin

Security or cache plugins can interfere with your WordPress site’s cookie and login handling and prevent the WordPress user login cookie from being generated correctly. As a result, this can lead to the error “Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

To fix that, temporarily deactivate the security & cache plugin by renaming the plugin’s folder. To do so, login to your website via FTP or a file manager plugin, and then rename the specific folder /wp-content/plugins/plugin-name to something else.

Then, try to log in again to the WordPress dashboard. If this fixes your issue, reinstall the cache and security plugin again, and let the developer of these plugins know about your experienced cookie issue so they can fix it.

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

If you migrate your WordPress website to another server while the domain remains and does not change, it can create a conflict between the cookies stored in your browser and the new hosting server. So, delete all browser cookies and try logging in to the WordPress dashboard.

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

You must paste a single code line at this spot to eradicate this error. You can access the wp-config.php file via Filezilla in the root folder of your website. Paste the code below at the bottom before it says
/* That’s all, stop editing!…*/.

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

Refresh the browser and be happy to log in again to your website.

Fix the error “Cookies are Blocked or Not Supported” by Editing the file functions.php

If none of the above solutions worked, try the fix below.

We’ve divided this solution into three separate steps:

Step 1: Open and Edit the File functions.php

You can access and open this file using the cPanel file manager or an FTP tool like Filezilla. After login, go into the theme folder of your website, where the file functions.php is located. That is usually wp-content/themes/theme-name/functions.php

Step 2: Add Code to the File functions.php

Copy the below code and paste it at the bottom of the file functions.php.

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

Step 3: Save the File

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


Looking for the most trusted backup & staging WordPress plugin?
Try out WP STAGING.

Related Posts

  • How to Block Google From Accessing a Staging Website
  • Fix the Error Cookies are Blocked due to Unexpected Output
  • How to Troubleshoot WordPress Login Issues?
  • How to Clear Browser Cache and Cookies?
Author Rene HermenauPosted on August 7, 2020March 27, 2024Posted In: Knowledge BaseTags: cookies error login
Join Our Newsletter

Get WP Staging release notes, special offers, news and tutorials in your inbox.

Subscriber Form
 
Company
  • Quality Assurance
  • Our Story
  • Reviews
  • About Us
  • Open Jobs
  • Contact us
Resources
  • All Pro Features
  • FAQ
  • Documentation
  • Blog
  • Refund Policy
  • Privacy Policy
  • Security Policy
  • Status
Partners
  • Affiliate Program
  • Press Kit
  • Compatible Hosts
  • Recommended Tools
  • Custom Development
Top Articles
  • What is the Best WordPress Backup Plugin?
  • How to Backup WordPress Automatically
  • How to Backup WordPress Manually
  • Transfer WordPress to New Host
  • Activate WordPress Debug Mode
  • Backup Website to Amazon S3
  • A WordPress Developer Short Story

  • EN
  • DE
  • Terms
  • Imprint