WordPress login keeps redirecting back to the login page

You type the right password, the page reloads, and you are back at wp-login.php. The login worked. The cookie that remembers it did not stick.

What to do, in order

  1. Clear cookies for the site and try a private window. Old cookies from a different address cause most loops.
  2. Check the two addresses. In wp-config.php add define('WP_HOME','https://example.com'); and define('WP_SITEURL','https://example.com'); with your real address. http against https, or www against no www, breaks the cookie.
  3. Behind Cloudflare or a proxy: add if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO']==='https') $_SERVER['HTTPS']='on'; near the top of wp-config.php.
  4. Disable plugins. Over FTP rename wp-content/plugins to plugins-off. If login works, rename it back and switch plugins on one at a time.
  5. Reset .htaccess to the default WordPress rules.

If it still fails, send me the address and I will tell you which step is broken.


Want the rest of your site checked after it is back? Run a free 40-point check at tinkeraudit.com.