Wp-cli search-replace issue on X theme sites

I typically will run wp-cli search-replace to clean up domains on Pro based sites (current version) when moving them from staging to production. Any page built with the Pro page builder continues to work and be edited in the page builder AFTER the search-replace occurs.

I did this same methodology on a X base site (current version of X) but all the pages built in Cornerstone no longer have the option to be edited in Cornerstone. The warning comes up that if I try and use Cornerstone, all the contents will be lost.

Is this restriction in being able to use wp-cli search-replace without breaking anything a difference between Cornerstone in the X theme and the native builder in Pro theme?

Is there any way to use wp-cli on X built sites?

I did read this article which is similar in nature - https://theme.co/apex/forum/t/how-to-fix-non-working-cornerstone-templates-due-to-sql-search-and-replace-solution/5874

Hi there,

Thanks for writing in.

I recommend using Better Search Replace plugin, or Velvet blues plugin when replacing URLs or domains. Or use migration tool that automatically changes internal URLs during the migration. Replacing internal URLs could damage serialized data in Wordpress database especially if your tool doesn’t safely replace it (packed data).

Thanks!

wp-cli does replace serialized data. I use it consistently under the Pro theme built sites.

My underlying question was if there is was any reason why my search-replace method would fail for X built theme when it works on the Pro theme.

Is there a fundamental underlying difference between the two themes?

Hi there,

There should be no difference between the two in term of content builder since both use the same data format/standard. But I couldn’t really provide answer what caused it since I don’t know how your search-replace process works.

I’ve done many safe search-and-replace and there are no issues. But I haven’t tried wp-client’s search replace yet. Perhaps you can export the template from the source site (the working one) and import it to your target site?

Thanks!

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