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

Posted July 3, 2015 106.4k views

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.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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?

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.