search-replace-command
search-replace-command copied to clipboard
Introduce a dedicated `search-replace url` command
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.