Last active
July 18, 2023 12:12
-
-
Save nash-ye/6754f569c46be2c58455eeb1d79e7a8e to your computer and use it in GitHub Desktop.
A Linux command to loop through CSV file records and do WP search-replace.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while IFS=, read orig new; do wp --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
Hi, do you have an example of the csv file?