WP CLI commands

Set post term with WP CLI

for id in $(wp post list --post_type=post --fields=ID)
do
    wp post term set $id category general --by=slug
done

Search and replace URL’s

wp search-replace https://oldurl.nl https://new-url.nl --all-tables --precise