How to Fix Cookies are Blocked in WordPress

How to Fix Cookies are Blocked in WordPress

Websites use various tools and technologies on the vast Internet to improve functionality and user experience. In this resource, we will consider the error and solution for the issue: Cookies are Blocked in WordPress.

WordPress is a widely used content management system that powers a significant percentage of the Internet. WordPress depends heavily on cookies to provide its users with personalized and seamless experiences.

However, only some trips through the virtual world are trouble-free. When cookies are blocked on WordPress, users may encounter circumstances that raise questions about the possible effects on their surfing experiences.

This article clarifies the overall situation with WordPress cookies and explains their importance in the larger website ecosystem. It is a helpful document for website administrators who want to maximize user engagement or for interested people who want to understand the technical details of online interactions.

Let’s traverse the digital terrain to offer insightful analyses of WordPress cookies and clarify the ramifications of their purposeful or inadvertent limitation.

Introduction to WordPress Cookies

What are WordPress Cookies?

WordPress cookies are small files that websites utilize to store visitor-related information. Because they retain information like usernames and the contents of online shopping carts, these files are essential to simplifying user experiences.

Beyond their fundamental uses, WordPress cookies enhance user experiences by storing preferences, remembering pages visited, and even allowing targeted adverts to appear on other websites. Also, WordPress uses cookies in the content management system to provide features like comments and authentication.

For example, WordPress uses cookies to ascertain whether a user is logged in and to allow or deny access to specific features. Essential functions like user login and commenting would not function without these cookies.

Related Reading: Clear Browser Cache in WordPress

Types of Cookies

Session Cookies

Session cookies, also known as transient cookies, are short-lived data stores without an associated expiration date. They record user interaction data during a website’s single session.

A session begins when a user views a website and ends when the browser closes, or the session expires with a time-out duration. In this case, a randomly generated or unique value represents a session. Session cookies are stored temporarily in memory and automatically clear when the user’s browsing session concludes.

Moreover, Session cookies are vital in designing secure web applications that help developers build intelligent applications, SaaS, and third-party integrations.

Persistent Cookies

Persistent cookies, on the other hand, have an expiration date and last for a longer time. They are stored on the user’s disk until they expire or are voluntarily deleted by the user.

Persistent cookies are often called “tracking cookies,” and services like Stripe, Google Analytics, and AdRoll use them. They are essential for monitoring user preferences and behavior over time.

What are WordPress Problems associated with Cookies?

While cookies are necessary for smooth, customized online experiences, improper handling can cause several issues with WordPress websites.

This section will examine the most prevalent issues related to WordPress cookies and offer workable fixes for handling these obstacles successfully.

Login Issues and Expired Cookies

Logging in is a common issue for WordPress users. A common cause of this problem is corrupted or expired cookies.

Users may find themselves locked out of their accounts when cookies that store login credentials expire or are damaged. Website owners should advise users to erase their browser cookies to fix issues routinely.

Login issues can also be avoided by ensuring the website’s cookie expiration settings follow security best practices.

Cross-Site Scripting (XSS) Vulnerabilities

WordPress is prone to security flaws like any other platform, with Cross-Site Scripting (XSS) being one of the biggest worries.

Malicious actors can use XSS vulnerabilities to insert malicious scripts into cookies, jeopardizing user information and website security.

Updating WordPress core, themes, and plugins is essential to reducing this risk. Using security plugins and conducting routine security audits can provide an additional defense against XSS attacks.

Third-party cookies and Privacy Concerns

Third-party cookie usage has been controversial as user privacy has become more critical. In this case, third-party apps like Email Marketing Tools, file converters, and page builders that send data to vendors can affect how WordPress deals with cookies.

Nowadays, many browsers automatically turn off third-party cookies, which affects how several components work on WordPress sites, such as tracking scripts and embedded content. If your site or web application relies on third-party cookies, the chances of functions misbehaving are high. Consult your site’s developer if you experience such scenarios.

Note: After having cookies managed in WordPress, ensure the necessary 3rd party cookies are properly managed. You’ll need to run A/B tests to see if cookies are not creating problems. This involves the following key aspects:

  • A staging site for experiment purposes
  • Developers’ assistance, especially those who track client-server response headers, to see if cookies are managed properly.
  • Testing the results to see if cookies blocked or allowed are not creating issues.

Instead of sacrificing user privacy, website owners should consider other options, such as employing first-party cookies, to guarantee ongoing functionality. Furthermore, gaining user consent and being open and honest about cookie use help promote trust.

Inconsistent Cookie Settings Across Subdomains

Cookie settings must be consistent for a unified user experience across WordPress sites with several subdomains and for security concerns.

Due to inconsistent cookie settings, users may experience unpredictable behavior, including being locked out while switching between subdomains. To solve the issue, website administrators should set up cookies to work with all subdomains.

This problem may be fixed, and visitors navigating between different site parts will have a smooth experience by adjusting the WordPress cookie domain settings and ensuring that setups are consistent.

Performance Impact of Excessive Cookies

While cookies are necessary for a website to function, too many can affect its performance. Bloated cookies can cause longer loading times, negatively impacting user experience and search engine rankings.

Website owners should routinely examine and optimize their use of cookies, eliminating any with no apparent purpose and simplifying those essential for operation. Browser caching and reducing cookie sizes help users improve their browsing experience, cookies, and overall performance.

Reasons Why Cookies Are Blocked in WordPress?

According to the message, this error notice does not always indicate that cookies are being blocked. There may be several causes; however, the following are the most typical ones:

Plugin for Security or Cache

One main reason is that a security or cache plugin can prevent cookies. Your security plugins can obstruct cookies and interfere with cookie management and log in. As a result, you get the “Your browser is blocking cookies or does not support them” message. To use WordPress, you need to allow cookies.

In the digital sphere, security is crucial, and WordPress is no different. When Cross-Site Scripting (XSS) vulnerabilities occur, the system may block cookies for security precautions.

To prevent malicious activity, browsers can take preventive measures to safeguard users by limiting the functionality of cookies linked to possibly compromised scripts.

Changing Hosting Providers

If you recently moved your WordPress website to a different server but kept the domain the same, a cookie conflict may arise between your new hosting server and your browser. As a result, it’s a good idea to clear all of your browser’s cookies before attempting to access the WordPress dashboard.

Preferences & Settings for the Browser

Through the settings and preferences of their browsers, users have a great deal of control over how they browse. Some people consciously turn off cookies in their browsers for privacy reasons or to minimize online tracking.

On WordPress websites, blocking cookies on purpose can make it more challenging to recall login information or save customized settings.

Incorrect Cookie Configuration

WordPress allows administrators to customize cookies’ expiration and domain settings, among other cookie characteristics.

For security concerns, browsers may block cookies if these configurations do not align with standard practices. Incorrectly configured cookies may cause problems with session management, login, and other aspects of the user experience.

Adherence to Privacy Regulations

As privacy laws become more stringent, website owners must understand that compliance is essential.

Legislation like the California Consumer Privacy Act (CCPA) and the General Data Protection Regulation (GDPR) mandates precise handling of user data and express authorization from the user for specific cookie types. To maintain legal compliance, cookies that violate these rules may be blocked.

Fixing the “Cookies are Blocked” WordPress Error: Workable Workarounds

Set the Domain

To rule out a one-time code execution problem, try refreshing the page if you see the “cookies are blocked” issue on your WordPress website. Should the problem continue, it may have something to do with how the domain is defined in your cookie.

To fix this, go to WordPress’ wp-config.php file and add the following line of code:

Cookies are Blocked in WordPress

Substitute the actual domain name of your website for “” Ensure this code appears before the file closes the line That says – “That’s all, stop editing! Happy Blogging”.

Ignore Cookies

A workaround, if not the best, would be temporarily disabling cookies from your website and letting you log in without them while you address the underlying problem. Add the following code to your WordPress theme’s Functions.php file to implement this.

Use the Code Snippets plugin to control and turn off these code lines individually for a more straightforward approach.

Fixing the "Cookies are Blocked" WordPress Error

Other Strategies

You can take the following further actions to troubleshoot the error:

  • Make a backup copy of the .htaccess file, delete the original, and see if it fixes the problem. If it works, create a new file by saving the permanent link.
  • Check to see if SSL plugins are sending users to HTTPS appropriately.
  • Rename the plugins folder to deactivate all the plugins temporarily, then enable each one again. This helps determine whether a security plugin is causing the error.

To restore WordPress to its original configuration, rename the theme file folder. If it works, proceed to reinstall the theme. The “cookies are blocked” problem is rare, although it can be related to an article.

Thanks to these solutions, you now have a toolset to deal with WordPress’ cookies-related errors. If problems continue, try asking for technical help or contacting the platform’s support.

How to Fix the “WordPress Not Supported Cookies Error” After Changing the Hosting Company or Server

After moving your WordPress website to a new hosting server with the same domain name, there may be a discrepancy between the cookies on your browser and the new hosting server. To fix this, delete all cookies from your browser and try to log into the WordPress dashboard once more.

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

To remove this mistake, add one line of code to the wp-config.php file, which you can access in the root folder of your website using Filezilla. Paste the code at the bottom before the line that reads:

Fixing the "Cookies are Blocked" WordPress Error

Here is the code snippet:


If you refresh the browser, you can log in to your website without seeing the cookies error.

Changing Functions.php will fix the “Cookies are Blocked or Not Supported” Error.

If none of the above fixes work, take the following steps carefully.

Step 1: Use functions.php to open and edit

Use the cPanel file manager or an FTP program such as Filezilla to access and open the functions.php file. Once logged in, go to your website’s theme folder, which is often located at wp-content/themes/theme-name/functions.php.

Step 2: Paste the code snippet in the Functions.php file

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

Cookies are Blocked or Not Supported

Step 3: Conserve the Data

You should no longer see the error “Cookies are blocked or not supported by your browser” after saving and uploading the functions.php to your website.

Which Cookies does WordPress use?

User and commenter cookies are the two primary types of cookies WordPress uses.

User Cookies

  • WordPress_[hash]: Only saves login credentials for the admin section.
  • WordPress_logged_in_[hash]: Allows a logged-in user to be recognized by the interface.
  • Wp-settings-{time}-[UID]: Allows for admin and main site interface view customization.

Commenters Cookies

WordPress saves cookies on users’ computers to remember their name, email address, and website URL when they leave comments on your blog.

  • comment_author_{HASH}
  • comment_author_email_{HASH}
  • comment_author_url_{HASH}

Due to GDPR, WordPress now has an opt-in button for commenters. To enable this, go to Settings > Discussion > Choose “Show comments cookies opt-in checkbox.”

Third-Party Cookies

Your WordPress website may employ cookies from installed themes, plugins, and third-party services like Google Analytics, YouTube, Facebook, or Hotjar.

These cookies might monitor user behavior to enhance the surfing experience or gather statistical information. Third-party cookies are necessary if your site relies on external sources. So, in this scenario, let’s consider an example.

Email Marketing Tools like Convert Kit allow users to install an official Plugin. When the data is processed, the plugin fetches form data from ConvertKit’s official user account. If the plugin cache is cleared, the plugin may lose access to users’ accounts on ConvertKit’s servers.

Third-party cookies are based on how, when, and where your WordPress site is sending or receiving cookies’ information from external sources.

Are WordPress Cookies Secure?

User and Commenter Cookie Security

WordPress uses a vital security feature that hashes user data—passwords and usernames, for example—using a mathematical algorithm.

It is challenging to reverse engineer or extract personal information from the cookie data because of this hashing procedure, which makes the data unreadable.

The security of commenter data is ensured in normal circumstances. Due to security precautions, the information usually doesn’t allow reversing.

Third-Party Cookies Considerations

Users’ cookies are safe with proper hashing algorithms; third-party service cookies—such as those set by plugins or themes—are not secure. Dealing with public cookies in WordPress can create maintenance issues, so be cautious.

Third-party cookies are concerned about security. Users shouldn’t rely on third-party cookies if integrating third-party cookies is not necessary.

Managing WordPress Cookies: Navigating Privacy Regulations

The GDPR’s Effects on WordPress Websites

The General Data Protection Regulation (GDPR), especially for WordPress, the world’s most popular content management system, has dramatically influenced how cookies are managed.

Cookie restrictions are significant for WordPress websites because the GDPR is a comprehensive law that affects websites processing personal data from European Union users.

Managing WordPress cookies requires compliance with privacy standards, which can be attained by following these steps:

  • Check and Identify Cookies: Analyze which kinds of cookies are being used.
  • Obtain Consent: Get secure user consent for third-party cookies and tracking. This ensures users feel safe, secure, and managed while sharing or processing users’ data, such as credit card information, sensitive data, or web browser cookies.
  • Disclose in Cookie Policy: Clearly explain cookies in a policy that is specific to them. This helps users comply, consent, and agree to how WordPress handles users’ cookies.

Note: If possible, create a page dealing with cookies’ consents, agreements, and data privacy rules. Also, ensure the page is regularly updated occasionally, especially when you’ve made changes to users’ privacy, especially cookies.

PHP Sessions: Balancing Functionality and Performance

Overview of PHP Sessions

PHP sessions provide an alternative to the conventional cookie approach and help manage cookies carefully. While still operating as a cookie, its name is unique—the PHPSESSID, in simple words. It typically resides in the /tmp/ directory on the web server. This session is related to a specific request through an HTTP cookie visible in the site’s HTTP header.

Similarities to Regular Sessions

Conceptually, a PHP session functions like a standard session that concludes when users close their browsers. This routine may come in handy while trying to work seamlessly with algorithmic management of cookies, such as PHP.

Performance and Caching Challenges

The challenge with PHP sessions centers around performance and caching issues. The information stored in the browser cookie must traverse back and forth with each request to ensure the server identifies the user. For websites utilizing PHPSESSID, correctness, and stability – the host must set PHPSESSID to bypass the cache.

However, a significant drawback is that PHPSESSID requires adjustment to bypass the cache 100% of the time. Unlike wordpress_logged_in, which requires settings selectively, the system generates PHPSESSID with every PHP request.

To illustrate, consider a scenario where the wordpress_logged_in cookie always requires settings, even for logged-out users, and it needs unique behavior for each user.

In such a case, every page view must bypass the cache to ensure the correct setting of the wordpress_logged_in cookie for both logged-in and logged-out users.

The Pitfall of PHPSESSID

The inherent issue with PHPSESSID lies in its generation with every PHP request. Relying on PHPSESSID cookies compels the host to set PHPSESSID to bypass the cache consistently—failure to do so results in cached PHPSESSID instances, disrupting functionalities dependent on them.

While sessions offer a viable approach in WordPress, especially for ensuring secure user identification, the associated caching challenges demand careful consideration.

Striking a balance between functionality and performance becomes paramount, requiring hosts to navigate the intricacies of caching to avoid unintended disruptions in site operations.

WordPress Cookie Checking: Human vs. Automated Techniques

Manual Methods

  • To view a list of cookies, use the Support Team terminals in your browser or look up the address bar.

Automated Method – Cookie Checker

  • Use a free cookie checker to get a detailed report on cookies, including their origin, function, and lifespan. These tools provide a more thorough and reasonable study.

Getting WordPress Cookie Consent: The Value of a Cookie Banner

Configuring a Cookie Banner

Incorporate a cookie banner into your WordPress website to get user consent for cookies. Critical Requirements for Cookie Banners include:

  • Give a concise and clear explanation of cookies’ purpose.
  • Make it simple for users to accept or reject cookies by providing options.
  • Separate options for consent are available in each cookie category.
  • Block tracking and third-party cookies temporarily until you get the user’s permission.
  • Provide a simple way to let users know about cookies consent.
  • Steer clear of false design techniques and meticulously record user choices as evidence of authorization.
  • Provide a link to a privacy or cookie policy that explains the cookies in great detail.


Employ a cookie banner generator or add one with some coding knowledge for a compliant and user-friendly solution.

WordPress cookies must be secure and compliant, which requires a multipronged strategy that includes adhering to privacy laws, addressing technical issues, and communicating openly with users. Sometimes, implementation requires A/B testing while focusing on what matters the most.

How Do I set up a WordPress Cookie Policy?

A cookie policy will be added once the cookie consent has been adjusted in WordPress. A cookie policy, similar to a privacy policy, is a legally binding document on a website that explains the use of Cookies, its purpose, who sets them, how long they last, and how users can manage them, including blocking or deleting them.

Start from scratch when creating a cookie policy, or use a free cookie policy generator to update your policy page automatically by adding new cookies to your WordPress website.


Now that you understand WordPress cookies better and some of the occasional errors, you can move on. Cookies are essential to almost everything on a WordPress site and keep the world turning.

You must handle cookies well, from maintaining your login credentials to guaranteeing a seamless shopping cart experience.

Website owners and administrators must comprehend the reasons behind WordPress’ cookie blocking to offer a flawless and safe online experience.

WordPress users can efficiently handle difficulties by being aware of the causes behind their worries, be it privacy, security, or regulatory compliance.

Last but not least, WordPress websites may adjust to changing user expectations and regulatory frameworks by following best practices in cookie management and remaining updated about how the digital landscape is changing. This builds confidence and improves the user experience overall. You can also perform A/B testing, Which helps you create seamless user experiences.

Let us know if you need expertise handling cookies-related issues in WordPress. For more information, visit our contact page. We can help you manage WordPress cookies, remove WordPress errors related to users’ cookies, and maintain your site with no particular expertise in hand.

wp tech support

Table of Contents

Leave a Reply

Comment policy: We value comments and the time that visitors to our blog spend to give feedback. Please note that all comments are manually moderated and any deemed to be spam or promotional will be deleted.