• Hi all,

    I’ve moved WP to a new domain and can’t login to wp-admin … the site just redirects the wrong place every time.

    I’ve checked wp-config.php, checked wp_options, checked all other database tables, cleared my cache, tried different browsers, reset passwords in the database … everything I can think of.

    It still tries, after I login, to redirect a completely different domain.

    Is there a setting I’m missing that’s telling WP where to send me after I login? If so, I can’t find it. 🙁

    Please help. 🙂

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter DigitalFormula

    (@digitalformula)

    Oh and .htaccess looks like this (pretty much default):

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    Thread Starter DigitalFormula

    (@digitalformula)

    Here’s an example of what the URL looks like:

    https://linuxplesk10.XXX.net.nz:8443/sitepreview/http/XXX.co.nz/wp-login.php?redirect_to=http%3A%2F%2FXXX.co.nz%2Fwp-admin%2F

    Even though I’ve replaced some of the bits with ‘XXX’ you can see that the URL I’m browsing to for wp-admin is different to the URL I’m getting as the redirect destination … sorry if that doesn’t make any sense. 🙁

    are BOTH url’s correct in the database?

    I think I’m having the same issue.

    I was updating my blog and used a plugin to lock the page. Some problem happened and I received PHP errors when going to the blog.

    I removed all files and cleared the database. Reuploaded the new wordpress files, and installed.

    It got to the part where it gave me my admin username/password. My blog itself has no design (not sure if this has to do with it) and clicking Log In redirects to the wrong spot.

    My blog is here: http://dylan.clancrg.net/lcastdte/

    Thread Starter DigitalFormula

    (@digitalformula)

    @samboll: Yes, they’re both the same in the database.

    Thread Starter DigitalFormula

    (@digitalformula)

    I’ve installed a completely new instance of WordPress and it still does the same thing …

    Is there *ANY* way at this WordPress could cause this? I’m assuming it’s simply not possible and I’ve been trying to get this across to my host but they’re insisting it’s because of the values of siteurl etc in the database (even though they’re set to the CORRECT domain).

    Is anyone able to verify/confirm that WordPress simply can’t build links to a domain that’s NOT configured in the database in either site URL or blog URL?

    I had a very similar problem when changing the domain of my wordpress install in a local dev environment. I realized after-the-fact that changing the domain within the admin UI is simply not sufficient. Even after fixing all occurrences of the the old domain name in the database I was still having trouble with the login redirect.

    I know it was accepting the password as an explicit attempt to use the wrong password produced an error. A correct login produced the following url in my browser:

    wp-login.php?redirect_to=http://mydomain/wp-admin/

    Rather than the redirect_to attribute working, the page just re-rendered the login form. Aside from accessing the admin UI, everything about my install appeared to be working.

    It turns out simply opening up wp-config.php and updating the constant DOMAIN_CURRENT_SITE was all it took to fix this error. I hope this helps anyone else struggling to troubleshoot problems with changing their domain.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WordPress won’t redirect properly …’ is closed to new replies.