File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,13 +23,6 @@ multisite, this will just be the tables for the current site unless
2323Search/replace intelligently handles PHP serialized data, and does not
2424change primary key values.
2525
26- Note: URLs stored inside JSON-encoded data (such as block attributes or
27- form configurations) often have forward slashes escaped with backslashes
28- (e.g. ` https:\/\/example.com ` ). Standard search/replace with unescaped
29- URLs will not match these. To replace URLs in JSON-encoded strings, run
30- an additional search/replace with escaped slashes (e.g.
31- ` wp search-replace 'https:\/\/example.com' 'https:\/\/example.test' ` ).
32-
3326Tables without a primary key are skipped. To check whether a table has a
3427primary key, run ` wp db query 'DESCRIBE <table>' ` and look for 'PRI' in
3528the Key column.
@@ -151,9 +144,6 @@ the Key column.
151144 # Search and replace but skip one column
152145 $ wp search-replace 'http://example.test' 'http://example.com' --skip-columns=guid
153146
154- # Search/replace JSON-encoded URLs (where forward slashes are escaped with backslashes)
155- $ wp search-replace 'https:\/\/example.com' 'https:\/\/example.test'
156-
157147 # Run search/replace operation but dont save in database
158148 $ wp search-replace 'foo' 'bar' wp_posts wp_postmeta wp_terms --dry-run
159149
You can’t perform that action at this time.
0 commit comments