wp-cli / search-replace-command

Searches/replaces strings in the database.
MIT License
57 stars 45 forks source link

Introduce a dedicated `search-replace url` command #186

Open danielbachhuber opened 1 year ago

danielbachhuber commented 1 year ago

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.

johnbillion commented 8 months ago

Related: https://github.com/wp-cli/ideas/issues/159

danielbachhuber commented 1 week ago

Related: https://github.com/WordPress/data-liberation/discussions/74