# Same issue, different day - imported site redirects to live URL

**URL:** <https://community.localwp.com/t/same-issue-different-day-imported-site-redirects-to-live-url/11937>\
**Category:** Uncategorized\
**Created:** [April 10, 2019, 12:25pm UTC](https://community.localwp.com/t/same-issue-different-day-imported-site-redirects-to-live-url/11937 "2019-04-10T12:25:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CateE](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@CateE](https://community.localwp.com/u/CateE)\
**Post date:** [April 10, 2019, 12:25pm UTC](https://community.localwp.com/t/same-issue-different-day-imported-site-redirects-to-live-url/11937/1 "2019-04-10T12:25:01Z")

</div>

I have seen a couple of tickets on this issue on the community board, but none of the suggestions have resolved it. When I attempted to visit or administer my locally imported site, it routes to the production/web/live version.

I have verified that there is no WP\_HOME or WP\_SITENAME settings in wp\_config  
I am unable to access the admin area of my local site so I cannot reset permalinks  
I have cleared my browser cache as well  
I have reviewed my hosts file to ensure that my sites appear and are defined as local  
I would look at the .htaccess file but I don’t see it - I just read an article that implies it may not be used by Local anyway.

I’m a newb so I don’t know what I don’t know in this. Any assistance you can provide is greatly appreciated.  
Thanks!

---

<div class="post-metadata">

**Author:** ![keegan](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/keegan/32/10354_2.png) [@keegan](https://community.localwp.com/u/keegan)\
**Post date:** [April 17, 2019, 9:15pm UTC](https://community.localwp.com/t/same-issue-different-day-imported-site-redirects-to-live-url/11937/2 "2019-04-17T21:15:42Z")

</div>

Hey there!

It sounds like some occurrences of the old domain wasn’t changed. To fix this I would recommend running `search-replace` with WP-CLI.

Here’s how you can run the search and replace with WP-CLI in Local:

1. Right-click on the site in Local
2. Go to ‘Open Site SSH’
3. Enter `wp search-replace '//olddomain.com' '//newdomain.com'` ([olddomain.com](http://olddomain.com) being your live Flywheel domain and [newdomain.com](http://newdomain.com) being your Local site domain)
4. Done!

If this doesn’t work you might also want to try visiting the site in incognito mode. Let us know if you are still having issues!

Keegan

---

<div class="post-metadata">

**Author:** ![CateE](https://avatars.discourse-cdn.com/v4/letter/c/4bbf92/32.png) [@CateE](https://community.localwp.com/u/CateE)\
**Post date:** [April 18, 2019, 1:04am UTC](https://community.localwp.com/t/same-issue-different-day-imported-site-redirects-to-live-url/11937/3 "2019-04-18T01:04:15Z")

</div>

This solved my redirection issue - I am now having problems where my themes are erroring because PHP version has caused some of the code to error. Sooo … upward and onward, but at least I’m looking at the correct site.  
Thanks!
