Skip to content

Instantly share code, notes, and snippets.

@markbosky
Created August 9, 2024 17:14
Show Gist options
  • Save markbosky/84a426f80f6460c62a10200fc36038dc to your computer and use it in GitHub Desktop.
Save markbosky/84a426f80f6460c62a10200fc36038dc to your computer and use it in GitHub Desktop.
Bulk Find and Replace Strings via WP-CLI from CSV
while IFS=, read orig new; do wp --dry-run --skip-themes --skip-plugins search-replace "$orig" "$new" wp_posts --include-columns=post_content --verbose; done < example.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment