search-replace-command icon indicating copy to clipboard operation
search-replace-command copied to clipboard

Introduce a dedicated `search-replace url` command

Open danielbachhuber opened this issue 1 year ago • 2 comments

The primary usage of wp search-replace is to update URLs in the database. However, URLs can be stored in various forms in the database (e.g. serialized into JSON), which means they're missed by wp search-replace.

We don't really want to change the behavior of wp search-replace, lest the sky fall down on our head. However, we could introduce a wp search-replace url command that handled the edge cases of URL formatting (serialized, http vs. https, etc.).

If we want to introduce this command, we'd first want to document these permutations of how URLs are stored. Afterwards, we could develop the command in a test-driven manner.

danielbachhuber avatar Jul 14 '23 15:07 danielbachhuber