Skip to content

Climb to the Stars

Stephanie Booth's online ramblings since summer 2000

  • 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, YouTube, Threads and Instagram. Maybe Tumblr, Flickr. And yes, still on Facebook.

Unless stated otherwise (a handful of transcripts), everything on this blog is completely human-written, typos and all.

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
  • Plume et canicule
  • La DIVA-5, comment l’utiliser pour poser un diagnostic de TDAH (Dora Wynchank)
  • SOS mites alimentaires: vive les bocaux!
  • Thoughts on Letting AI Write For You
  • Reading Like a Student
  • The Perils of Hearing Less in the Classroom
  • Billet manuscrit, Paris toujours, un 4 juillet
  • Pas toujours dans les vieilles casseroles
  • Bloggified Brother!
  • Plume et canicule30.07.2026
    Transcription IA non-vérifiée (30.07.2026): Lausanne, jeudi 30 juillet 2026, 19h J’ai du temps. J’ai mangé. C’est la canicule – de nouveau. Ce matin j’ai mis le réveil à 5h pour tout ouvrir, parce que je ne voulais pas attendre 1h du matin que la température de dehors descende enfin sous celle de dedans. Juju fait … Continue reading "Plume et canicule"
  • Thoughts on Letting AI Write For You22.07.2026
    I was planning to write another blog post. I may still write it – or not. But as I opened my computer, I had a pile of open tabs. I’d clicked on a bunch of articles of Daniel Miessler’s blog for possible further reading. Daniel is the guy behind LifeOS (previously PAI), a personal AI framework … Continue reading "Thoughts on Letting AI Write For You"
  • Transcriptions des gribouillis manuscrits22.07.2026
    Pour les personnes qui attendaient de me lire sans devoir déchiffrer mon écriture à la main, les transcriptions (merci l’IA, faites avec Claude, pas contrôlées – donc signalez-moi si vous voyez des bizarreries) ont été ajouté aux photos de mes pages de cahier.
  • Pas toujours dans les vieilles casseroles18.07.2026
    Transcription IA non-vérifiée (22.07.2026): Lausanne, 18 juillet 2026, 20h40 C’est clairement moins pratique de tenir en équilibre sur ses genoux un plateau et un cahier qu’un ordinateur portable. Mais bon : le soir après le souper, cuisine rangée, sur le canapé du balcon avec Juju qui dort à côté, ça commence à prendre la forme … Continue reading "Pas toujours dans les vieilles casseroles"
  • Refuser les titres et aller à des concerts17.07.2026
    Ah, les titres! Ces derniers temps, prise d’une inspiration subite, j’ai fait quelques exercices d’écriture à la main. Promis, je demanderai à une IA de me les retranscrire pour que vous ne soyez pas obligés de zoomer sur les photos de mes ratures sur votre smartphone. C’est une expérience intéressante, d’autant plus que je résiste … Continue reading "Refuser les titres et aller à des concerts"
  1. M on Anthropic payment woes – resolved30.07.2026

    You are amazing <3 I think it's been the most releaving post I read since a few years. You saved…

  2. Olivier Bruchez on Thoughts on Letting AI Write For You26.07.2026

    Amusant que tu mentionnes Daniel Miessler. J'ai suivi son blog à partir de 2011. À l'époque, il écrivait sur des…

  3. Daniel on Anthropic payment woes – resolved21.07.2026

    It's completely wild that I need to come to a BLOG POST to find answers to payment issues on a…

  4. Docthib on Pas toujours dans les vieilles casseroles19.07.2026

    Super intéressant ! Merci de partager, ce que tu écris résone beaucoup en moi (par d'autres chemins que l'IGB /…

  5. Lyonel Kaufmann on Balcon méditatif au chalet16.06.2026

    Chère Stéph', Ton texte m'a saisit par les tripes et par mon âme. Je t'entends. A l'écoute. C'est peu. Alors…

Some podcasts

  • Mystery Show
  • On the Media
  • Savage Lovecast
  • Freakonomics Radio
  • Invisibilia
  • Serial
  • Death, Sex & Money
  • Planet Money
  • Love + Radio
  • Radiolab
  • Reply All
  • Startup
  • 99% Invisible
  • This American Life
  • The Moth
  • Snap Judgment
  • Limetown
  • TED Radio Hour
  • Note to Self
  • Sur les Docks [fr]

Popular and Related

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