Wp-admin redirect to another wordpress login site.

jackorz

Newbie
Joined
Dec 13, 2016
Messages
21
Reaction score
4
Hey,

I registered an expired domain, installed Wordpress but when i try to go mysite.com/wp-admin it redirects me to antohersite.com/wp-admin.

What can i dot to solve that?
 
Seems more like a DNS/nameserver problem. Are you sure that the URL is connecting to the right (name)server? Have you checked the (reverse) IP?

Another reason could be the main URL in Wordpress. Perhaps you copied the install from another websiteand didn't change the site url? Also did you empty your cache?
 
Check with your host and make sure the domain is set properly in the zone registry. Also try clearing your cache or logging in from a different computer.
 
No, the other site is not mine. The nameservers are ok, if i go to mysite.com it is my web, with the just installed wordpress and the automatic post, so is my site. But when i go to wp-admin it redirects to another site.

another thing i just discovered is that if i install wordpress without httpswww. and just http it does not redirect.
 
No, the other site is not mine. The nameservers are ok, if i go to mysite.com it is my web, with the just installed wordpress and the automatic post, so is my site. But when i go to wp-admin it redirects to another site.

another thing i just discovered is that if i install wordpress without httpswww. and just http it does not redirect.
It does sound like the domain didn't register properly in your hosts zone records. I'd have them look at it before anything else.
 
No, the other site is not mine. The nameservers are ok, if i go to mysite.com it is my web, with the just installed wordpress and the automatic post, so is my site. But when i go to wp-admin it redirects to another site.

another thing i just discovered is that if i install wordpress without httpswww. and just http it does not redirect.
Yep, could be n SSL or zone problem. Better check for all records to be addressed properly.
 
Well, its the SSL. I tried installing my own SSL (cloudflare free SSL) but it doesnt work, dont know what to do anymore :'(.

Thank you anyway guys :)
 
The problem is in your database.

You need to manually edit the config table using SQL and change the root URL to the new domain.

What I do is mysqldump, then substitute all mentions of old URL to new URL, then recover the dump. Easier than going one by one in SQL.
 
I also think that the problem is in your database.
On your cpanel open phpmyadmin, click on your wp database, look for 'wp_options' table, then on 'option_name' column look for 'siteurl' and check that your site name is correct.
 
You might wanna use Wordpress search and replace script. (Only if its not a DNS issue)

Step 1: Download this script
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Step 2: Upload it to your directory where you installed Wordpress

Step 3: Rename the file searchreplacedb2.php to somethingelse.php

Step 4:
Open the file http://yourwebsite.com/somethingelse.php

Step 5: type in the domain name anothersite.com
in the search field and your domain name in replace with field.

Click replace it will populate your database click okay and you are done.

Side Note: Above mentioned steps are for the script 2.1.0 not 3.0

 
I also think that the problem is in your database.
On your cpanel open phpmyadmin, click on your wp database, look for 'wp_options' table, then on 'option_name' column look for 'siteurl' and check that your site name is correct.

Thank you. I did that at the start but the siteurl and homeurl were good.

I believe is the ssl. When i try with the https It says that my site is not secure because the ssl IS only for theothersite.com then It redirects me to the other site
 
Open phpmysql admin

go to wp-options table

make sure your current site is pointed correctly..
 
Back
Top