Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Search_Replace_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down