Bulk Assign Categories/Tags to Posts from CSV
wp_bulk_assign_termsBulk assign categories or tags to posts via CSV, using term names instead of IDs. Missing tags are auto-created; dry-run preview prevents accidental term replacement.
Instructions
Assign categories or tags to many posts using term NAMES (not IDs). Missing tag names are auto-created by default. Required columns: post_id, taxonomy (category|tag), term_names (comma-separated). Defaults to dry_run=true.
This REPLACES existing terms in that taxonomy on each post. To merge with existing terms, look those up first and include them in term_names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| csv_path | Yes | Path to CSV. Required columns: post_id, taxonomy (category|tag), term_names (comma-sep names — missing tags are auto-created). | |
| stop_on_error | No | ||
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |
| auto_create_missing | No | If a term name doesn't exist: create it (true, default) or fail the row (false). |