@@ -10,7 +10,7 @@ Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contr
10
10
## Using
11
11
12
12
~~~
13
- wp search-replace <old> <new> [<table>...] [--dry-run] [--network] [--all-tables-with-prefix] [--all-tables] [--export[=<file>]] [--export_insert_size=<rows>] [--skip-columns=<columns>] [--include-columns=<columns>] [--precise] [--recurse-objects] [--verbose] [--regex] [--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>] [--format=<format>] [--report] [--report-changed-only] [--log[=<file>]] [--before_context=<num>] [--after_context=<num>]
13
+ wp search-replace <old> <new> [<table>...] [--dry-run] [--network] [--all-tables-with-prefix] [--all-tables] [--export[=<file>]] [--export_insert_size=<rows>] [--skip-tables=<tables>] [--skip- columns=<columns>] [--include-columns=<columns>] [--precise] [--recurse-objects] [--verbose] [--regex] [--regex-flags=<regex-flags>] [--regex-delimiter=<regex-delimiter>] [--format=<format>] [--report] [--report-changed-only] [--log[=<file>]] [--before_context=<num>] [--after_context=<num>]
14
14
~~~
15
15
16
16
Searches through all rows in a selection of tables and replaces
@@ -61,6 +61,10 @@ change primary key values.
61
61
You might want to change this depending on your database configuration
62
62
(e.g. if you need to do fewer queries). Default: 50
63
63
64
+ [--skip-tables=<tables>]
65
+ Do not perform the replacement on specific tables. Use commas to
66
+ specify multiple tables.
67
+
64
68
[--skip-columns=<columns>]
65
69
Do not perform the replacement on specific columns. Use commas to
66
70
specify multiple columns.
@@ -135,9 +139,9 @@ change primary key values.
135
139
# Bash script: Search/replace production to development url (multisite compatible)
136
140
#!/bin/bash
137
141
if $(wp --url=http://example.com core is-installed --network); then
138
- wp search-replace --url=http://example.com 'http://example.com' 'http://example.dev' --recurse-objects --network --skip-columns=guid
142
+ wp search-replace --url=http://example.com 'http://example.com' 'http://example.dev' --recurse-objects --network --skip-columns=guid --skip-tables=wp_users
139
143
else
140
- wp search-replace 'http://example.com' 'http://example.dev' --recurse-objects --skip-columns=guid
144
+ wp search-replace 'http://example.com' 'http://example.dev' --recurse-objects --skip-columns=guid --skip-tables=wp_users
141
145
fi
142
146
143
147
## Installing
0 commit comments