Skip to content

Commit 8ffca00

Browse files
authored
Merge pull request #208 from wp-cli/copilot/improve-precise-flag-description
2 parents 61993eb + 791b3d3 commit 8ffca00

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/Search_Replace_Command.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ class Search_Replace_Command extends WP_CLI_Command {
183183
* specify multiple columns.
184184
*
185185
* [--precise]
186-
* : Force the use of PHP (instead of SQL) which is more thorough,
187-
* but slower.
186+
* : Force the use of PHP (instead of SQL) for all columns. By default, the command
187+
* uses fast SQL queries, but automatically switches to PHP for columns containing
188+
* serialized data. Use this flag to ensure PHP processes all columns, which is
189+
* slower but handles complex serialized data structures more reliably.
188190
*
189191
* [--recurse-objects]
190192
* : Enable recursing into objects to replace strings. Defaults to true;
@@ -248,6 +250,9 @@ class Search_Replace_Command extends WP_CLI_Command {
248250
* # Search/replace to a SQL file without transforming the database
249251
* $ wp search-replace foo bar --export=database.sql
250252
*
253+
* # Use precise mode for complex serialized data
254+
* $ wp search-replace 'oldurl.com' 'newurl.com' --precise
255+
*
251256
* # Bash script: Search/replace production to development url (multisite compatible)
252257
* #!/bin/bash
253258
* if $(wp --url=http://example.com core is-installed --network); then

0 commit comments

Comments
 (0)