Can't login to wordpress wp-admin after change of url

July 3, 2015 72.5k views
DNS WordPress MySQL PHP Ubuntu

I created a droplet with wordpress pre-installed, i was using the site with the IP as the URL for close to a week

I connected my domain name to the droplet and then i logged-in to the wordpress dashboard to also change the site-url in the settings page.

After changing, i couldn’t login again, and i noticed that when i use the right password, it doesn’t show any error, but when i use the wrong password it shows an error.

I have tried to edit the url details from the wp-options table in the database but that ain’t working either. Any help please

  • I recently ran into the same issue, of course while I was away from my home server so I didn’t have access to my wp-admin file.

    I did the following to finally get back access.

    I went to my website.

    it let me get to a page with username and password

    (this was all done in chrome)

    i used the developer tools to inspect to find this
    <form name=“loginform” id=“loginform” action=“” method=“post”>
    <label for=“user_login”>Username<br>
    <input type=“text” name=“log” id=“user_login” class=“input” value=“” size=“20”></label>
    <label for=“user_pass”>Password<br>
    <input type=“password” name=“pwd” id=“user_pass” class=“input” value=“” size=“20”></label>
    <p class=“forgetmenot”><label for=“rememberme”><input name=“rememberme” type=“checkbox” id=“rememberme” value=“forever”> Remember Me</label></p>
    <p class=“submit”>
    <input type=“submit” name=“wp-submit” id=“wp-submit” class=“button button-primary button-large” value=“Log In”>
    <input type=“hidden” name=“redirect_to” value=“”>
    <input type=“hidden” name=“testcookie” value=“1”>

    and additionally
    <input type=“hidden” name=“redirect_to” value=“”>

    you will then edit

    action=“” method=“post”>

    so that where it says you change to what your actual url is.

    then input your correct login information as well as password then click login without refreshing the page. If done correctly you will login to your dashboard and then from there you can change the wordpress url to the correct one under settings.

    hope this helps people without access to there files


  • Hello all.
    I do not have any experience in website development or anything similar. For ignorance I changed the name of the site and now I do not have access to the admin. The site was not crafted by me and its creator still understands less than I do. I have no idea if they were backed up, much less how to back up.
    I followed your instructions but still cannot enter the admin to correct the error, and i´m not sure I understand the part were you say;

    and additionally
    <input type=“hidden” name=“redirect_to” value=“”>

    you will then edit

    action=“” method=“post”>

    I do undestand I´m supose to change the to, but not much more then that.

    Could really use some help, please.

4 Answers

I think you need to edit your wp-config.php file (among others). It must have your IP in there and now that you’re using your domain, it’s causing issues.


Curious, does your IP URL still work?

  • it is even trickier now… so if i visit the blog using the URL i can’t login to the admin section but if i vist the blog using the IP i can login to the dashboard…and then when logged in, the URL changes from the IP to the normal URL.... now i am perplexed

    • The same thing has happened to me continuously. There aren’t any straight forward directions on this site for when something goes wrong. The help on this site is “here’s a link. bye!” How do we fix this?

  • @mafulun4real Hmm. Is that after running through the steps from that WordPress article I linked to?

i think you don’t change url properly or may be plugin mistake.. i found an article on this topic if you want to use plugin.. most imp. i used this and my changed admin url work easily

Yeah I broke my link completely..


is the one I want

is the original

Based on advice from another site, I cleared all my cookies and it worked. Was about to begin a cursing fit.

Have another answer? Share your knowledge.