Forums

New Domain, Old Domain Login (4 posts)

  1. stilfx
    Member
    Posted 1 year ago #

    Install was setup here: newdomain.olddomain.com
    Moved to here: newdomain.com
    **note: olddomain.com does have its own install of wp.

    Problem:
    I moved a wp install to a new domain, the site works, but wp-login is still trying to redirect back to the old domain wp-admin when I hit http://newdomain.com/wp-admin/

    it redirects to this..

    http://olddomain.com/wp-login.php?redirect_to=http://newdomain.com/wp-admin/&reauth=1

    Essentually, trying to log into the root wp-admin in olddomain.com

    Workaround:
    I did save the URL/Home in settings>general before moving.
    I got new wp-admin to work by adding:
    define('WP_HOME','http://newdomain.com');
    define('WP_SITEURL','http://newdomain.com);
    ..to the wp-config

    Question:
    But what I want to know.. where is newdomain.com storing the reference to olddomain.com?

    If I remove those define's from the config, it breaks. It's as if the DB wont update the new domain location.

  2. govpatel
    Member
    Posted 1 year ago #

    Did you reset your permalinks after change of urls.

  3. stilfx
    Member
    Posted 1 year ago #

    Sure did. Even double checked the .htaccess file.

    I have a feeling it's save in the DB someplace.

  4. govpatel
    Member
    Posted 1 year ago #

    Since you have this in wp-config.php file

    define('WP_HOME','http://newdomain.com');
    define('WP_SITEURL','http://newdomain.com);

    and it breaks you website if you take them out.

    You will need to reset your urls in database I have video on my website shows how reset urls.

Topic Closed

This topic has been closed to new replies.

About this Topic