Skip to content

Instantly share code, notes, and snippets.

@ghwoodard
Created February 1, 2024 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghwoodard/747c78984a45cf62564618384afbf9fa to your computer and use it in GitHub Desktop.
Save ghwoodard/747c78984a45cf62564618384afbf9fa to your computer and use it in GitHub Desktop.
Fix WP Login Error: Cookies are Blocked or Not Supported by Your Browser // Source: https://wp-staging.com/how-to-fix-the-error-cookies-are-blocked-or-not-supported-by-your-browser
<?php
// Option 1: Add following to WP-Config.php before That’s all, stop editing! line
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );
// Option 2: Add Code to the functions.php file
if ( SITECOOKIEPATH != COOKIEPATH ) {
setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment