Duplicated breakdance site, ends up with wrong content paths

Hi guys, sry for disturbing you, but for the first time in ages I’m having some problems with local that I can’t fix.

I just discovered this problem accidentally.

Having exported my sites from local, then clean installed Sonoma, reinstalled local, and pulled in my exports.

I’m getting a problem that I can’t seem to solve with the site shell and the wp search-replace replace command.

see screenshot

It seems that what happened is that I have been cloning breakdance websites on the old local; but without me noticing it, somehow the new clones relate to the content from the first installation, though it should have changed the path.

So now I’m getting “insecure” mixed content, and as I said wp search-replace in the shell does not fix it.

Etc. wp search-replace ‘http://’ ‘https://’ does not fix these paths (fixed many hundreds paths though, but these exact ones are stuck as http.

Btw. I had some problems with the ssl certificated earlier today, but solved it:

  1. by killing off other apps running on port 80.
  2. Then using keychain accesss to approve of the ssl certificates.

I’m on a 2020 iMac (with the t2 chip, not sure if it matters).
Sonoma 14.5
Local Version 9.0.3+6684
Breakdance 1.7.2

Thanks

You might need to include more of the URL in your S&R jobs. I often find I need to do this as just doing HTTP to HTTPS doesn’t always catch everything.

wp search-replace http://xi-2.local https://xi-2.local

You might also utilize the [–all-tables] flag

You also have different domains in there some of them are xi.local and some are xi-2.local. If you’re still having trouble you might utilize a plugin for help.

1 Like

The diffrent domain are the actually problem I think :smiley:

  1. So I started out with site one / domain 1.

  2. Cloned it with local to a new site / domain.

It seems that doing this, the second site, still used path from the first site.

So now with my new local setup, where I dumped site 1, the site no longer works :smiley: :smiley: :smiley:

Is freaking out a bit about that …

But I’ll just try what you wrote, though I think I have tried it.
But I’ll just try doing it again :smiley:

I also tried better search replace, and it didn’t seem to fix it either btw.

To start I would try running this:

wp search replace http://domainone.local https://domaintwo.local --all-tables

1 Like

Sadly it’s not working, for some reason it does not want to change the http://xl.local nor the http://xl-2.local into anything else

Have tried the following with no success:

wp search-replace http://xl.local https://xl-2.local --all-tables
wp search-replace http://xl-2.local https://xl-2.local --all-tables

Sadly this does not work …

Just to test if I could in anyways change the http links, I also just tested this:

wp search-replace http://xl.local https://xl.local --all-tables
wp search-replace http://xl-2.local https://xl.local --all-tables

This made no changes to any of the urls either, they still remain as http.

The resource files have been duplicated to the new domain, so the files are there.
The internal links just won’t change.

Btw it’s also really strange that the localWP clone function did not change these urls when I cloned the sites as well.

Instead of cloning what about if you do a re-import?

The steps would look like this:

  • Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
  • Once you have those copied, completely delete the site from Local
  • Restart Local/your machine
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Before that you could try toggling your Router Mode to see if that helps clear anything help as well.

Preferences>Advanced>Router Mode

You could change it to Localhost, save and restart, and then try changing back to Site Domains if you prefer HTTPS to see if it helps clean anything help.

1 Like

Nick I really, really appreciates this!!!

And I will just try all you mentioned, though I think I have tested some of it out.

But the problem is the sites must have been broken on my old installation as well.
Not certain, because they where working and now they are not (everything worked on ventura, on the iMac I just replaced), but back in that local installation I still had the original sites running, so they might have drawn from each other - I only exported the last version.

I did import these sites into local today …

it’s really weird because Search and Replace plugin does not find these strings either.

Sadly that did not work either … even tried exporting it into “xl.local” instead of xl-2.local", the http seems locked … also tried importing it into just localhost, instead of ssl, not working either.

Perhaps I should try to push the site onto a host and see if I can change the path in another environment … but it’s really weird these paths seems hidden to both the wp-cli commands and the search and replace plugin.

Okay, I just figured out breakdance have a built in path changer, and it seems to work :smiley: testing it out right now.

EDIT IT FIXED ALL OF IT!

Might be useful to pin or something, if others are using breakdance.
In backend: Breakdance => Settings => Replace URL <= This tool works!

1 Like

Glad to hear it @Heliotropen! Thank you for circling back and sharing the resolution for others to find.

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.