dev site on subdomain prevents admin login to subdomain
-
My host told me I could do a dev copy of my WP site on a subdomain, so I made dev.mysite.com and copied everything over including a copy of the database. I edited the WP config to the new DB and restricted access to just my IP.
Turns out this works fine until you try to go to dev.mysite.com/wp-admin and login. The login redirects you to the main domain, mysite.com, so you cannot admin your dev site.
I’ve seen a couple of solutions for this that are more like hacks, probably outdated, involving mass search and replace on the raw database. I want to avoid that sort of thing.
Is there a simple solution for this that doesn’t involve hacking code? Maybe a one-liner?
Surely others are doing dev work on copies of the live site on the same host?
- The topic ‘dev site on subdomain prevents admin login to subdomain’ is closed to new replies.