# Being redirected when trying to view site - have tried everything

**URL:** <https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466>\
**Category:** Support\
**Created:** [August 5, 2017, 1:10am UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466 "2017-08-05T01:10:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![whitneywooyy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/whitneywooyy/32/4949_2.png) [@whitneywooyy](https://community.localwp.com/u/whitneywooyy)\
**Post date:** [August 5, 2017, 1:10am UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/1 "2017-08-05T01:10:47Z")

</div>

I am being redirected to an old dev site domain (that I changed in Local recently - I know, shouldn’t have done this in hind sight). I swear I have tried everything…

1. I went directly into Adminer and searched and replaced everything I could find, EXCEPT one file that I don’t have permissions to edit: information\_schema/processlist
2. Tried `wp search-replace '//olddomain.com' '//newdomain.com'` - nothing came up.
3. Tried `grep -R "olddomain.com" .` but it only returned results from access/error logs
4. I have defined `WP_SITEURL` and `WP_HOME`

None of this has solved my issue. I am able to view the site with Local’s Live Link but I really need this to work without internet…

Note: `/wp-admin` works but the redirect only happens when trying to view the [dev] site domain.

---

<div class="post-metadata">

**Author:** ![rollacreative](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rollacreative](https://community.localwp.com/u/rollacreative)\
**Post date:** [August 9, 2017, 8:41pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/2 "2017-08-09T20:41:21Z")

</div>

Having the same problem. I downloaded a backup from a Flywheel site and imported into Local. Keeps taking me to my Flywheel site rather than on my machine. Live internet link works though. Help?

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [August 9, 2017, 8:43pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/3 "2017-08-09T20:43:58Z")

</div>

If you enable “Dev Mode” (top-right of site info page) does the issue go away?

---

<div class="post-metadata">

**Author:** ![rollacreative](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rollacreative](https://community.localwp.com/u/rollacreative)\
**Post date:** [August 10, 2017, 6:31pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/4 "2017-08-10T18:31:57Z")

</div>

Thanks for the response. No, it still redirects.

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [August 11, 2017, 2:14pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/5 "2017-08-11T14:14:37Z")

</div>

@rollacreative,

What is the site name on Flywheel? I can try to reproduce the issue if you’d like.

Also, feel free to private message me the name of the site in case you can’t say it publicly.

---

<div class="post-metadata">

**Author:** ![rollacreative](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rollacreative](https://community.localwp.com/u/rollacreative)\
**Post date:** [August 11, 2017, 4:46pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/6 "2017-08-11T16:46:40Z")

</div>

@clay Annunciation Dev. Thanks!

---

<div class="post-metadata">

**Author:** ![rollacreative](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@rollacreative](https://community.localwp.com/u/rollacreative)\
**Post date:** [August 14, 2017, 5:09pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/7 "2017-08-14T17:09:56Z")

</div>

@clay Hey there - Thought I’d check in to see if you’d had a chance to look into it? Thanks for your help.

---

<div class="post-metadata">

**Author:** ![clay](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/clay/32/8248_2.png) [@clay](https://community.localwp.com/u/clay)\
**Post date:** [August 14, 2017, 6:51pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/8 "2017-08-14T18:51:09Z")

</div>

Hi @rollacreative,

It looks like Local got confused on the import since there are two different WP table sets in the SQL file.

So, to fix the site after importing, I simply change `$table_prefix` in wp-config.php to `wp_`.

Then, I ran the `search-replace` command like so: `wp search-replace "//annunciationdev.flywheelsites.com" "//dev-domain-here.dev"`

After that, you may want to enable Dev Mode so you can see the domain changes.

---

<div class="post-metadata">

**Author:** ![Fr\_Joel\_Wilson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/fr_joel_wilson/32/4979_2.png) [@Fr\_Joel\_Wilson](https://community.localwp.com/u/Fr_Joel_Wilson)\
**Post date:** [August 17, 2017, 9:44pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/9 "2017-08-17T21:44:08Z")

</div>

Hi @clay

I tried this and it’s still forwarding. Any other ideas? I’ve never had a problem downloading and importing a site into Local before so I’m not sure what changed in this process since the last time I did it.

---

<div class="post-metadata">

**Author:** ![leotulipan](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/leotulipan/32/5078_2.png) [@leotulipan](https://community.localwp.com/u/leotulipan)\
**Post date:** [September 26, 2017, 7:44am UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/10 "2017-09-26T07:44:56Z")

</div>

I had the same issue and had to change https to http in siteurl and home. See my post here [Fixed: 301 redirect loop on newly restored/cloned site](https://local.getflywheel.com/community/t/fixed-301-redirect-loop-on-newly-restored-cloned-site/3006?u=leotulipan)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [August 25, 2020, 6:32pm UTC](https://community.localwp.com/t/being-redirected-when-trying-to-view-site-have-tried-everything/2466/11 "2020-08-25T18:32:24Z")

</div>

Closed on August 25, 2020, 6:32pm UTC


