WordPress 5.9 Users trying to access the homepage when the session expires, are sent to re-authenticate.

The behavior seems weird since it only applies to the homepage. Users with expired sessions can access all other pages without being asked to re-authenticate.

Why is the behavior inconsistent, and how can users with expired sessions not be redirected to re-authenticate?

  • 2
    WP 7.x is not out yet. Have you tried changing your theme and deactivating plugins to see if one of them is the culprit?
    – WebElaine
    Jan 25, 2022 at 17:21
  • thanks for pointing it out! I have made already an amendment to match the latest version!
    – m1k3y3
    Jan 26, 2022 at 16:59

1 Answer 1


If you looked at your plugins one by one and none of them causes the problem, look at your template files that display your home page – could be index.php, home.php, content.php, content-{slug/id}.php or page-templates/..., depending on your theme and settings.

Look for

if (!is_user_logged_in()) {

or anything that seems to resemble this. It could be a shortcode or hook also, but its name will probably have something to do with user/login/auth. If you found it, comment it out and reload, and see if it's fixed.

  • 1
    thanks a ton! problem solved! I've added also a safeguard on the .htaccess to redirect users to properly log out so it does not reoccur after update
    – m1k3y3
    Jan 26, 2022 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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