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

July 3, 2015 3.4k 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

1 comment
  • 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

1 Answer

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?

Have another answer? Share your knowledge.