Subdomain dev site urls getting redirected to live site urls


I have a dev install on a sub-domain of my live site. last week I installed a backup of live site on dev site. ever since I cant get to the dev site pages (except for the homepage and backend). I have tried uninstalling cache on dev site and re-saving permalinks.

Is something happening in Cloudflare that is redirecting to the live site?

Any advice would be greatly appreciated.


No, Cloudflare doesn’t do redirects unless you’ve added a Page Rule that does so.

Considering you copied your live site to the dev site, I bet there’s something in there that’s retained the live site URL. A database search should turn something up. Or possibly a config file.

1 Like

Sounds like you need to check your paths in config or conf files and change to the sub or check that you’ve defined the right database. What type of site is it?

Thanks for the tips sdayman and withheld,

Its a Wordpress site and I used wp-clone to copy across. I also install the same backup on a localhost with no problems. so its not the backup files.

last night I created a fresh wordpress install and tried the backup again. same issue.

one thing I noticed,

Say if a URL in my live site is https://domain/oil-prices
then if i type i URL https://domain/dev/oil-prices
this gets redirected

but this happens not just for /dev/

I can type https://domain/anything/oil-prices and this will also be redirected to https://domain/oil-prices

this is why I thought it might be a Cloudflare feature, something like “Always Online™”


Since it’s WordPress, if you can access the Dev Dashboard I’d check Settings > General and change WordPress Address (URL) and Site Address (URL). if you can’t access the Dev dashboard, edit those URL’S in the Options table in the Dev database.

**And don’t forget to put Cloudflare in to development mode and purge the cache for the dev site

This topic was automatically closed after 14 days. New replies are no longer allowed.