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

Sirius.EKR

Newbie
Joined
Feb 13, 2018
Messages
17
Reaction score
0
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 !
 

murdock477

Junior Member
Joined
Aug 22, 2016
Messages
142
Reaction score
76
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
 

rimvy

Regular Member
Joined
Oct 8, 2017
Messages
455
Reaction score
165
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');
 

Sirius.EKR

Newbie
Joined
Feb 13, 2018
Messages
17
Reaction score
0
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');

thank you brooo, now i can connect to the /wp-admin
 
Top