From d73f945224b7c29017d6317116bd211a5faa4113 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:05:00 +0000 Subject: [PATCH 1/2] Initial plan From 791b3d313145c86299a09d33ad04040b38c3f078 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:09:06 +0000 Subject: [PATCH 2/2] Improve --precise flag documentation and add example Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- src/Search_Replace_Command.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Search_Replace_Command.php b/src/Search_Replace_Command.php index 6e3f85cf..97a86dd8 100644 --- a/src/Search_Replace_Command.php +++ b/src/Search_Replace_Command.php @@ -183,8 +183,10 @@ class Search_Replace_Command extends WP_CLI_Command { * specify multiple columns. * * [--precise] - * : Force the use of PHP (instead of SQL) which is more thorough, - * but slower. + * : Force the use of PHP (instead of SQL) for all columns. By default, the command + * uses fast SQL queries, but automatically switches to PHP for columns containing + * serialized data. Use this flag to ensure PHP processes all columns, which is + * slower but handles complex serialized data structures more reliably. * * [--recurse-objects] * : Enable recursing into objects to replace strings. Defaults to true; @@ -248,6 +250,9 @@ class Search_Replace_Command extends WP_CLI_Command { * # Search/replace to a SQL file without transforming the database * $ wp search-replace foo bar --export=database.sql * + * # Use precise mode for complex serialized data + * $ wp search-replace 'oldurl.com' 'newurl.com' --precise + * * # Bash script: Search/replace production to development url (multisite compatible) * #!/bin/bash * if $(wp --url=http://example.com core is-installed --network); then