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

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!

  • La DIVA-5, comment l’utiliser pour poser un diagnostic de TDAH (Dora Wynchank)
  • Web
  • Anthropic payment woes – resolved
  • Ego
  • Appeal Regarding the Suspension of my Facebook Account @stephtara
  • Pseudonyms on Facebook
  • Pensée II
  • Spectacle de danse
  • Games People Play: Alcoholic/Addict
  • Listed!
  • Balcon méditatif au chalet16.06.2026
    Je suis au chalet. Juste pour deux nuits. Ma chambre à coucher est en train d’être repeinte, donc je ne peux pas y dormir. Donc je profite. Les deux nuits d’avant, entre le vidage de la chambre et l’arrivée des peintres, j’ai dormi sur le canapé à l’eclau. Le pauvre Juju était tout perturbé! Je … Continue reading "Balcon méditatif au chalet"
  • Concussion With a Side of Grief, or Vice-Versa07.06.2026
    Oscar died a bit over a month ago. Five weeks exactly, actually. Of course it hasn’t been simple. I’ve been wanting to write for weeks, but not getting around to it. It’s a pattern, isn’t it. It has been for years, decades probably. Wanting to write, needing to write, and not getting around to it. … Continue reading "Concussion With a Side of Grief, or Vice-Versa"
  • Faire porter sa chatte01.06.2026
    Je sais qu’il y a des tas de gens qui font le choix de ne pas stériliser leur chatte “pour avoir des petits”, et qui peut-être ne comprennent pas l’énervement des gens branchés “protection animale” face à ça. Si on est responsable, qu’on soigne bien les chatons, qu’on leur trouve de bons foyers, où est … Continue reading "Faire porter sa chatte"
  • C’est pas le pied18.05.2026
    Je voulais écrire hier. Hier, deux semaines après la mort d’Oscar. Le choc a passé. Je suis de retour au travail – avec difficulté la semaine dernière, on verra ce que raconte celle-ci. Il reste le manque. Il me manque. Je commence tout juste à entrer parfois dans mon appartement sans ressentir très fort la présence … Continue reading "C’est pas le pied"
  • Ghosts in the Heart08.05.2026
    In the days of early grief, the pull towards the being you lost is still there. It pulls at your heart but has nowhere to go. It is a ghost. A ghost of habits and rituals, a ghost of familiarity, who feeds on unmoored love – another name for grief.  Like a phantom limb in … Continue reading "Ghosts in the Heart"
  1. 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…

  2. Stephanie Booth on MySpace supprime les profils de 29'000 "délinquants sexuels"19.05.2026

    Se faire engueuler dans les comms de son blog avec quasi 20 ans de retard 👌

  3. imright on MySpace supprime les profils de 29'000 "délinquants sexuels"19.05.2026

    "choses aussi anodines que: relations homosexuelles, nudisme, uriner dans un lieu public, faire l’amour dans un lieu public, etc. "…

  4. Merethe Søndergaard on My Very Old Oscar09.05.2026

    I feel your pain and I can relate with my super senior cat

  5. Konstantin on Ghosts in the Heart08.05.2026

    Thank you for capturing this so well. Now I have words to come back to, when the next wave of…

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