Skip to content

Climb to the Stars

Stephanie Booth's online ramblings

  • Blog
    • About
    • Presse
    • Pages [old]
  • Random Post
  • Now
  • Bluesky
  • Flickr
  • Tumblr
  • Facebook
  • Mastodon
  • Coworking

Tag: wp-login.php

WordPress wp-login.php Problem [en]

Explanation and solution to the nasty Wordpress problem which keeps kicking you out of your admin section with ridiculously long URLs. Just a few lines to delete in a file.

[fr] La solution au problème qui fait qu'on se retrouve parfois régulièrement expulsé de la partie admin de WordPress, et qui implique des URLs d'une longueur indécente, ne menant nulle part. Il suffit de supprimer deux lignes dans wp-login.php.

Yesterday, without a warning or an explanation, my WordPress install started acting funky. Even though I was logged in, I would be faced with very very long URLs showing me a broken login page when I tried to go back to the admin section (something like https://climbtothestars.org/wp-login.php/wp-admin/wp-smilies/wp-content/wp-admin/post.php?action=edit&post=xxxx). Deleting all the cruft after wp-login.php allowed me to log in, but a few clicks later I would find myself faced again with the same nasty situation.

This is caused by a bug in wp-login.php. What happens is that the Blog URL option gets changed to that long funky line in the database, and of course, it messes everything up.

The first thing I did was correct the siteurl value in the database (options table), because I have direct access to the database and like sticking my hands in there. If you don’t have access to the database, you can probably (I’m not certain) set this right through the Options screen in the admin section for your blog. (Remember, if you feel locked out, go directly to http://example.com/wp-login.php to log in.)

There is a forum thread about this problem, but the solution isn’t presented very clearly to my taste — hence this post.

Now for the fix: if you are not going to be moving your blog around (ie, changing the blog address) without having direct access to the database, you can edit the file wp-login.php and delete a couple of lines. Open wp-login.php in your favourite text editor, and do a search for get_settings(‘siteurl’) — that will bring you to the right place in the file. Delete these lines:

// If someone has moved WordPress let's try to detect it
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])
!= get_settings('siteurl') )
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] .
$_SERVER['REQUEST_URI']) );

I’ve had a similar problem with my Blogsome test blog — with the URL for the CSS file going all funky. It seems to be back to normal, but I’ll check that they are indeed aware of the problem.

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on LinkedIn (Opens in new window) LinkedIn
Author Stephanie BoothPosted on 04.12.2004Categories WordpressTags admin, bug, delete, edit, file, forum, locked out, long, problem, security, solution, URL, Weblog Technology, Wordpress, wp-login, wp-login.php20 Comments on WordPress wp-login.php Problem [en]

Welcome!

Stephanie Booth

Climb to the Stars is Stephanie Booth's personal site. Blog powered since summer 2000. Follow her on Bluesky, Mastodon, Threads and Instagram. Maybe Tumblr and Flickr. No Facebook, I've been disappeared.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Blogs to read

FeedLand river for easy reading, try it!

  • Anthropic payment woes – resolved
  • La DIVA-5, comment l’utiliser pour poser un diagnostic de TDAH (Dora Wynchank)
  • Standards in Business
  • La clé du véritable assistant IA: l'infrastructure IA personnelle (PAI)
  • New Links
  • Recherche de Fonds
  • TDAH au féminin (Dora Wynchank)
  • Newsgroups
  • Sortir de Facebook? 1. Micro.blog
  • Cinéma
  • La clé du véritable assistant IA: l’infrastructure IA personnelle (PAI)17.04.2026
    Même si je ne suis pas en train de vibe-coder à tour de bras, j’ai bien sauté dans le train côté IA. Depuis deux ans environ, je dis que ce que je ressens concernant l’importance et le potentiel de l’IA générative est quelque chose que je n’ai pas senti depuis ma découverte d’internet il y … Continue reading "La clé du véritable assistant IA: l’infrastructure IA personnelle (PAI)"
  • Anthropic payment woes – resolved13.04.2026
    TL;DR: enter card details manually, not using Link, if you need to change your payment method and it’s stuck. Three days ago my Claude Pro subscription was up for renewal but I’d forgotten to top-up the prepaid credit card I use for this. It was (logically) declined and my subscription was suspended.  I was using … Continue reading "Anthropic payment woes – resolved"
  • The Wild Magical World of AI (LLMs)05.04.2026
    End 2024 is when I really started to get going with “AI” (or LLMs – I know saying “AI” is kinda wrong, but there seems to be no good way to escape it right now). I’d been dabbling a bit before that: as a search engine, to help me with my excel formulas at work, or … Continue reading "The Wild Magical World of AI (LLMs)"
  • Titres, écriture, initiation de tâches, et IA03.04.2026
    Devoir mettre un titre à un article, c’est clairement un frein à l’initiation de la tâche “écrire un article”. Vous avez déjà remarqué ça? De mon point de vue, c’est aussi une des raisons pour lesquelles ce qui se racontait sur les blogs à gentiment migré vers les réseaux. Sur Facebook ou LinkedIn, nul besoin … Continue reading "Titres, écriture, initiation de tâches, et IA"
  • Today is Tomorrow27.03.2026
    A friendly colleague I share some geeky interests with told me today I was courageous to announce my blogging intentions yesterday. I told him “not that much”, because if I didn’t stick to my declaration of intent, it’s not something I’d feel terribly bad about. Writing that quick post yesterday made me feel a bit … Continue reading "Today is Tomorrow"
  1. Stephanie Booth on The Wild Magical World of AI (LLMs)06.04.2026

    Exactly! I’m so glad I never spent time organising and renaming my screenshots 🤣

  2. Olivier Bruchez on The Wild Magical World of AI (LLMs)06.04.2026

    I love the part of the Venn diagram where tasks that I've procrastinated for a long time and tasks that…

  3. Olivier Bruchez on Fed Up02.03.2026

    Courage, Stephanie !

  4. Euan Semple on It’s Not Good29.01.2026

    Hi Stephanie, I am so sorry to hear about your cat being ill. Our cat Albie has been in the…

  5. Ambre on Et alors, aujourd’hui?27.01.2026

    Je découvre ton espace... Merci, tellement, d'avoir posé ces mots-là. Je ne suis pas diagnostiquée TDAh mais persuadée de l'être,…

  • Blog
    • About
    • Presse
    • Pages [old]
  • Random Post
  • Now
  • Bluesky
  • Flickr
  • Tumblr
  • Facebook
  • Mastodon
  • Coworking
Climb to the Stars Proudly powered by WordPress