Being redirected when trying to view site - have tried everything

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 '//' '//' - nothing came up.
  3. Tried grep -R "" . 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.

1 Like

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?

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

Thanks for the response. No, it still redirects.


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.

@clay Annunciation Dev. Thanks!

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

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 "//" "//"

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

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.

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