when I want to connect in mywebsite/wp-login.php it takes me to a weird page with the old domain

Discussion in 'Web Hosting' started by Sirius.EKR, Mar 8, 2018.

  1. Sirius.EKR

    Sirius.EKR Newbie

    Joined:
    Feb 13, 2018
    Messages:
    17
    Likes Received:
    0
    Gender:
    Male
    hi people, i am a newbie in wordpress and hosting because i used blogger, i have a site on wordpress host at hostgator, and yesterday i wanted to change the domain name of my site, so i saw a video who said that we had to change the primary domain name of the package in hostgator, so I did it, then the problem came, when I write the link of my new domain name it takes me to the site, but when I want to connect in mywebsite/wp-login.php it takes me to a weird page with the old domain name , and all links of my old domain ( like wp-admin, index.php... ) show that weird page , so i reset my original primary domain thinking that will fix the issue but nothing change , and i disconnet the new domain in the dns manager in godaddy , and nothing change and in addition now both domain show my website mu i cant connect with both into my dashboard.
    pleaase help me i have google adsens in this site !
     
  2. murdock477

    murdock477 Junior Member

    Joined:
    Aug 22, 2016
    Messages:
    109
    Likes Received:
    58
    Gender:
    Male
    Location:
    Estonia
    you have to change your wp-config file, there you find something like define(WP_home) and define(URL). Change them to your new domain and should be good
     
  3. rimvy

    rimvy Jr. VIP Jr. VIP

    Joined:
    Oct 8, 2017
    Messages:
    451
    Likes Received:
    154
    Gender:
    Male
    Location:
    localhost
    For default in wp-config these are not defined. Put this code to the bottom of wp-config.
    Code:
    define('WP_HOME','YOURNEWDOMAIN');
    define('WP_SITEURL','YOURNEWDOMAIN');
     
  4. MRgauss

    MRgauss Registered Member

    Joined:
    Jun 6, 2014
    Messages:
    59
    Likes Received:
    1
    Check also your .htaccess file in server root folder
     
  5. Sirius.EKR

    Sirius.EKR Newbie

    Joined:
    Feb 13, 2018
    Messages:
    17
    Likes Received:
    0
    Gender:
    Male
    thank you brooo, now i can connect to the /wp-admin