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.

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
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)
  • Comment on foire? (ou: comment souper tard mène à la cuisine déprimante)
  • Appeal Regarding the Suspension of my Facebook Account @stephtara
  • Les traitements médicamenteux: situations actuelles et perspectives TDAH (Samuele Cortese)
  • Giardiose: ma copine giardia lamblia
  • Contrôle cognitif et perception temporelle chez des adolescents TDAH
  • TDAH au féminin: troubles liés aux périodes prémenstruelles et périménopausales (Dora Wynchank)
  • Des opérateurs logiques et des mots -- "et", "ou", "si(-alors)" et la négation
  • Where Have All The Bloggers Gone?
  • Régulations des émotions dans le TDAH: diagnostics différentiels avec les troubles de la personnalité et les troubles de l’humeur (Alexandra Philipsen)
  • Comment on foire? (ou: comment souper tard mène à la cuisine déprimante)14.12.2025
    Depuis quelques semaines j’ai un rendez-vous hebdomadaire avec ma “binôme planning”. Une copine, TDAH bien aligné sur le mien (ou le mien sur le sien), aussi tendance à la surcharge d’agenda qui fait finir sur les rotules. Une affaire qui roule (pas sur les rotules). On parle évidemment de problématiques TDAH en marge de l’agenda, … Continue reading "Comment on foire? (ou: comment souper tard mène à la cuisine déprimante)"
  • Et alors, aujourd’hui?11.12.2025
    C’est 21h11, il me reste un poil de temps, même si je suis trop raide. Mais tant pis. Ecrire c’est important, et si j’attends toujours que les conditions soient bonnes, eh bien j’attends. Aujourd’hui, Oscar galope presque après retour de sa dose de gabapentine à son habituelle (33mg matin et soir). Je suis soulagée, car … Continue reading "Et alors, aujourd’hui?"
  • Fits and Starts02.12.2025
    Heavens, what happened to blogging after 8pm? There was a week there where I seemed on a roll. I was also managing the rest of my life. And the small slice of work. It felt like it was working out. And these days I’m just too exhausted for pretty much anything. I looked back to … Continue reading "Fits and Starts"
  • Can I Write a Quick Blog Post?16.11.2025
    This is often the question. In typical ADHD style, my difficulty getting started on something is only surpassed by my difficulty stopping something once it’s started. So, 9pm on Sunday night, tired tired tired, can I grab my keyboard and give you some news without still being up at midnight? I challenge myself. Mid-October, I … Continue reading "Can I Write a Quick Blog Post?"
  • Des “mini-podcasts” à écouter14.11.2025
    Après l’introduction d’hier (enfin à l’heure de publication, c’est avant-hier), venons-en au menu principal: une collection de podcasts en série limitée, type documentaire en x épisodes, surtout en anglais (parce qu’il y en a moins en français, tout simplement). A écouter, bien sûr. Je ne les ai pas mis dans un ordre particulier, juste comme … Continue reading "Des “mini-podcasts” à écouter"
  1. DEMADE Emma on Body doubling: mode d’emploi06.12.2025

    Hello Merci pour les diapo sur le contrôle exécutif et la gestion du temps.. Auriez vous les références de l…

  2. Stephanie Booth on Fits and Starts06.12.2025

    Don’t be sheepish! Getting things to work, in any form, is great! I think I am missing a piece of…

  3. Les Orchard on Fits and Starts05.12.2025

    I will tell you, maybe a little sheepishly, that I am cheating with the weeknotes I've started posting. 😅 First,…

  4. Lyonel Kaufmann on Réflexions de convalescence solitaire10.11.2025

    Je trouve très sain et courageux que tu nous proposes ce billet. Je suis admiratif devant les défis que tu…

  5. Stephanie Booth on Blogging After 8PM09.11.2025

    I think your little tool idea would be a great start! I had half a mind to try copy-pasting my…

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