How to fix "Cookies are blocked or not supported by your browser." error in wordpress

#1

Hey, guys recently I setup bitnami by Wordpress in GCP. Some time ago I could log in to my wp dashboard. After installing let’s encrypt I am unable to log in to the wp dashboard. It shows the following error.

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

Note - the whole site is working perfectly but I am unable to log in.

1 Like

#2
  • Try to access login page different version of URL non-www or www. You should be able to login.

  • If above step doesn’t work, clear your cookies try again!

Additionally, I don’t think there should be any problem.

1 Like

#3

:frowning_face: Not working.

1 Like

#4

@GulshanKumar issue solved close the thread.

1 Like

#5

Would you mind sharing, what steps did you followed to resolve the issue?

1 Like

#6

This is the solutions.
I replaced following code.

define(‘WP_HOME’,’//www.example.com’);
define(‘WP_SITEURL’,’//www.example.com’);

With

define(‘WP_HOME’,‘http://example.com’);
define(‘WP_SITEURL’,‘http://example.com’);

In wp-config.php file

If you want to add www. extension you can too. with

define(‘WP_HOME’,‘http://www.example.com’);
define(‘WP_SITEURL’,‘http://www.example.com’);

In conclusion, just avoid the following code to avoid cookies related problem. Instead of that, you can use the above code to redirect your website from HTTP to https without any problem.

define(‘WP_HOME’,’//www.example.com’);
define(‘WP_SITEURL’,’//www.example.com’);

2 Likes

#7

Just to add one more possible case …

This problem can also happen in case someone has specially defined …

define( 'COOKIE_DOMAIN', 'www.example.com' );

and trying to login at path /wp-login.php with non-www version.

3 Likes