WordPress admin login cookies blocked error after moving servers

Solution: 1

add to wp-config.php

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', ''); 

Solution: 2

Having migrated hundreds of WP sites, here’s a few thoughts :

If migrating the DB : Check the database options table (probably wp_options) column “option_name” that values “siteurl” and “home” have the correct “option_value” for your site. “siteurl” is huge.

I can testify that the options table tweak is the bare minimum required to migrate a DB to a new domain in WP. (will not cause redirection, will still have issues)

WP looks up these DB options to serialize the site to domain and I am pretty sure the defines are lower in the stack and of no help. Consider the wp-admin activities as loosely coupled to the front. You can break everything (done it) in the front and the admin will still function.

Also – did/does the site work with generic install/no migration or tweaks?

As mentioned – .htaccess (missing or misconfigured) will cause your error. Regarding the .htaccess file, if used, this is a dot.file and many operating systems will “ignore” or “make invisible” so a copy/paste or FTP application or similar may not carry the .htaccess

(pretty sure on this) If you moved the DB and used pretty urls, and missed the .htaccess that could be all you need to fix. I just tested locally on a sandbox install and the table wp_option column “option_name” value “permalink_structure” when left blank in column option_value will return to ?p=1 (non-permalink) status and .htaccess will be mostly bypassed.

 

Solution: 3

this bug was driving me crazy the last couple of days so i thought after fixing it to share with you guys! the problem was when i was trying to login into my wordpress backend i got this annoying cookies error so this is how i fixed it!

  1. Go to your ftp and your domain.
  2. Afterwards go to your wp-contents
  3. Go to your themes folder
  4. Chose the theme that is active
  5. Look for functions.php of your teem and open it
  6. At the ende of the code you should see closing tag p> just remove it clear the spaces also and save it!
  7. Go to your domain.com/wp-login.php
  8. and try to login it should be fixed afterwards you can put the tag back where it was and save it again that was the solution for me this trick also fixes the white page problem in wordpress

Cheers!