How to fix “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

This kind of problem usually appears when your WordPress website is bombarded with active security and caching plugins. The error appears on the login page and hinders you from logging into the back-end. Below is an example of the error:

Solution # 1

Try to refresh your browser 2-3 times if it doesn’t work then try changing your browser. If the error doesn’t go away, you need to allow cookies on your browser.

Mostly, refreshing the page usually fixes the error. However, if refreshing doesn’t work, you should follow the options below.

Solution # 2

Prerequisites:

In this tutorial, you will learn how to fix the problem either using the WordPress editor or the Cpanel editor. To follow along to this tutorial, you need the following:

  1. Cpanel access (Option 1).
  2. WordPress backend access (Option 2).

Cpanel login credentials are provided by your web hosting company.

Login into your Cpanel and locate the file manager. Open the file manager.

On the left, open the ‘public_html’ folder to access your website files.

Open the ‘wp-content’ folder.

Open the themes folder.

Locate the folder of the active theme. In the demonstration below, the active theme is WPLMS.

Find the ‘functions.php’ file. The files are arranged alphabetically so it should be easy to find it.

Select the ‘functions.php’ file then click on the ‘edit’ button at the top of the page.

When the pop-up appears as shown below, select the ‘edit’ button to proceed to the editor.

Once the ‘functions.php’ file opens in the editor, copy and paste this code at the bottom:

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

After pasting the code as shown below, click the ‘Save Changes’ button to update your changes.

When you go back to your WordPress login page, the error should have cleared completely.

Leave a Reply