Skip to content

Instantly share code, notes, and snippets.

@veganista
Created July 15, 2016 10:34
WP CLI Commands

Assign all post thumbnail to a specific attachment

wp post list --post_type=post --format=ids | tr ' ' '\n' | xargs -I % wp post meta add % _thumbnail_id {{ATTACHMENT_ID}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment