I recently moved the site from localhost to the live server. And when I try to access the wp-admin page I keep getting the blank page and no errors are shown although WP_DEBUG is true. And when I open the wp-login.php, I do get the log-in screen but not able to log in and get the following error:

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

I checked for the white space after every <?php and before every ?>. I deleted all white spaces but got no success. Please help me out

  • Try a different browser and/or check your current browsers security settings (and enable Cookies there). – kaiser Oct 25 '14 at 9:12
  • i enabled the cookies and even tried in different browser but its still the same – terminator Oct 25 '14 at 9:19
  • Have you messed up the cookie constants in your wp-config.php? – kaiser Oct 25 '14 at 9:38
  • there is no mention of cookie constants in wp-config.php – terminator Oct 25 '14 at 9:43
  • Turn off all plugins, switch to one of the default themes. – kaiser Oct 25 '14 at 11:27

Try this in your functions.php file:

//fix for cookie error while login.
setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN); 
    setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.