• I am attempting to build a command I can run (via SSH connection to the wordpress host) that will read a list of post_tag slugs from the first column in a .csv file, then replace matching tags with a new name and slug from the second column of the file.

    while IFS="," read orig new; do wp term update post_tag "$orig" --by="slug" --name="$new" --slug="$new"; done < tagupdate.csv

    The above is what I have so far, but I don’t know how close I am. Any advice would be greatly appreciated. (Also, would something like this work for a multisite install with the –network flag?)

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘WP-CLI: Bulk post_tag updates from .csv file?’ is closed to new replies.