Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
search-replace fails to match URLs escaped with backslashes #3753
Sample input is:
For this report, I'm using revslider as an example.
Steps to Reproduce
Thanks for the amazingly detailed report, @tedmasterweb
As painful of an experience as this is, it's expected behavior.
As is often the case, the problem seems to have vanished with time… Revslider has an importer and exporter. In the end we just exported the slides and imported them independent of the rest of the database. IINM, this is only a problem (only manifests) when URLs are stored in serialized arrays (meta, mostly). wp-cli actually deserializes these values and does a search and replace in PHP. If you pass the
For example, given
Please note, I have not tested this but it should point you in the right direction. Good luck!
I had this same problem with my deployment pipeline when migrating the database. Solution was to use the following plugin which extends wp-cli: