Specify Key value when Search and Replace in Serialized Data
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the wp search-replace entry point and review how meta_key and meta_value are processed for serialized data. Done means allowing replacement to be limited to rows whose meta_key matches amazonS3_info, while preserving correct serialized-data updates.
Written by the indexing model from the issue text.
Description
I came across the scenario of moving my S3 bucket and while doing that also changed the path.
I upload an image, It is sent to Kraken.io, and Uploaded to S3 using Media Offload.
I made a copy locally of the database and ran wp search-replace 'old-bucket 'new-bucket. To my joy, the serialized string was also updated.
My next task was to update the media path. Previously it would have been old-bucket/year/month
Now it would be new-bucket/media/year/month
If I were to search and replace based off of /2015 I am going to affect the _wp_attached_file and _wp_attachment_metadata
Is it possible to search inside of two columns where one column value is equal to something else?
Like look in meta_value where meta_key == amazonS3_info?
- Dominant language
- Gherkin
- Stars
- 61
- Forks
- 47
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wp-cli/search-replace-command
-
bug command:search-replace scope:distribution state:unconfirmed
Difficulty 4/5 3-5 days Newbie friendliness 45/100
wp-cli/search-replace-command#231 · 5 comments ·
-
command:search-replace
Difficulty 5/5 Over a week Newbie friendliness 35/100
wp-cli/search-replace-command#194 · 1 comment ·
-
command:search-replace contributor-day
Difficulty 5/5 Over a week Newbie friendliness 25/100
wp-cli/search-replace-command#186 · 2 comments · 11 reactions ·
-
command:search-replace
Difficulty 4/5 3-5 days Newbie friendliness 35/100
wp-cli/search-replace-command#142 · 5 comments · 2 reactions ·
-
command:search-replace
Difficulty 3/5 1-2 days Newbie friendliness 52/100
wp-cli/search-replace-command#137 · 6 comments · 4 reactions ·
All issues in wp-cli/search-replace-command
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
qgis/QGIS-Documentation#11275 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
milvus-io/birdwatcher#545 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·