WordPress Login Loop After an SSL Change: How I Triage It

Leader ●1 ●27 ●110
calendar_today • schedule1 min read
— Originally published at amanurrahman.com

"I can type my password but WordPress just sends me back to the login page." I get this one a lot, and it nearly always shows up right after an SSL install, a www change, or a host move. Here is how I triage it.

Step 0: Backup. Most fixes touch wp-config.php, .htaccess, or the database.

Step 1: Rule out the browser.
Clear cookies for the site, try a private window, try another browser. The login is really about a cookie, so a bad cookie is a cheap first suspect.

Step 2: Compare siteurl and home.
If http vs https or www vs non-www differs between them, the cookie can fail. If I can't reach Settings, I force both with WP_HOME and WP_SITEURL in wp-config.php, then fix the real values and remove the override.

Step 3: Look at who is forcing HTTPS.
Host toggle, SSL plugin, .htaccess rule, Cloudflare. Two at once is a classic loop. Cloudflare Flexible SSL plus an origin redirect is the one I see most.

Step 4: Rename .htaccess.
If login works without it, I regenerate it from Permalinks and add custom rules back one by one.

Step 5: Rename the plugins folder.
No dashboard needed. If that fixes it, I bring plugins back one at a time.

Step 6: Cache and security.
wp-login.php and wp-admin should never be cached. I also check whether a 2FA or firewall plugin blocked my own IP.

Step 7: Make sure it's really a loop.
If the redirect goes to another website, or there are unknown admin users, it's a security incident, not a settings problem.

Full version with the exact snippets and a decision table for "fix it myself or call someone": https://amanurrahman.com/blog-post/wordpress-login-redirect-loop-fix

What's your usual first move when a client says they're locked out?

Want more #webdev & #web-development deep dives?

Join 6,176+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

Just completed another large-scale WordPress migration — and the client left this

saqib_devmorph - Apr 7

Short links that outlive the vendor: a newsroom URL shortener on WordPress and AWS

jaafarabazid - Nov 10

How AI Is Changing Web Development, and What Developers Still Need to Understand

Daniel Decker - Nov 10

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19
chevron_left
4.6k Points • 138 Badges
Bangladesh • amanurrahman.com
74Posts
9Comments
14Connections
WordPress & WooCommerce Developer with 14+ years of experience building, optimizing, and scaling onl... Show more

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!