• I am having problem with user login in WordPress. When a user logs in, the web page refreshes and the login form appears again. Here is what I have tried:

    1. I added define(‘COOKIE_DOMAIN’, $_SERVER[‘HTTP_HOST’] ); in wp-config.php It did not help.
    2. I removed the above line and added define(‘COOKIE_DOMAIN’, false ); That also does not help.
    3. I kept the line define(‘COOKIE_DOMAIN’, false ); in wp-config.php and added the following piece of code in functions.php:

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

    That also does not help. But, now, if the user refreshes the page after log in or provides his credentials again in the login form, he is able to login.

    Any help will be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you getting an error like in the picture?
    23d3fb904cd5ae86690b4a310eae4158.png

    • This reply was modified 3 years, 2 months ago by oliviaalma.
    Thread Starter userpqr

    (@userpqr)

    Thanks @oliviaalma for your reply. Do you mean I need to delete all files in the object cache? What is the location of the folder and how should I delete the files in the folder? The problem indeed started happening after I updated a number of plugins as well as the theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Login Problem’ is closed to new replies.