Title: wp term
Published: February 5, 2018
Last modified: April 5, 2026

---

# 󠀁[wp term <command>](https://developer.wordpress.org/cli/commands/term/)󠁿

Manages taxonomy terms and term meta, with create, delete, and list commands.

## In this article

 * [Examples](https://developer.wordpress.org/cli/commands/term/?output_format=md#examples)
 * [Subcommands](https://developer.wordpress.org/cli/commands/term/?output_format=md#subcommands)

[ Back to top](https://developer.wordpress.org/cli/commands/term/?output_format=md#wp--skip-link--target)

 [ ⌊GitHub⌉ ](https://github.com/wp-cli/entity-command)

 [ View Open Issues (0) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aterm+sort%3Aupdated-desc+org%3Awp-cli+is%3Aopen)
[ View Closed Issues (37) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Aterm+sort%3Aupdated-desc+org%3Awp-cli+is%3Aclosed)
[Create New Issue](https://github.com/wp-cli/entity-command/issues/new)

See reference for [taxonomies and their terms](https://wordpress.org/documentation/article/taxonomies).

### 󠀁[Examples](https://developer.wordpress.org/cli/commands/term/?output_format=md#examples)󠁿

    ```
    # Create a new term.
    $ wp term create category Apple --description="A type of fruit"
    Success: Created category 199.

    # Get details about a term.
    $ wp term get category 199 --format=json --fields=term_id,name,slug,count
    {"term_id":199,"name":"Apple","slug":"apple","count":1}

    # Update an existing term.
    $ wp term update category 15 --name=Apple
    Success: Term updated.

    # Get the term's URL.
    $ wp term list post_tag --include=123 --field=url
    http://example.com/tag/tips-and-tricks

    # Delete post category
    $ wp term delete category 15
    Success: Deleted category 15.

    # Recount posts assigned to each categories and tags
    $ wp term recount category post_tag
    Success: Updated category term count
    Success: Updated post_tag term count
    ```

### 󠀁[Subcommands](https://developer.wordpress.org/cli/commands/term/?output_format=md#subcommands)󠁿

| Name | Description | 
| [wp term create](https://developer.wordpress.org/cli/commands/term/create/) |

Creates a new term.

  | 
| [wp term delete](https://developer.wordpress.org/cli/commands/term/delete/) |

Deletes an existing term.

  | 
| [wp term generate](https://developer.wordpress.org/cli/commands/term/generate/) |

Generates some terms.

  | 
| [wp term get](https://developer.wordpress.org/cli/commands/term/get/) |

Gets details about a term.

  | 
| [wp term list](https://developer.wordpress.org/cli/commands/term/list/) |

Lists terms in a taxonomy.

  | 
| [wp term meta](https://developer.wordpress.org/cli/commands/term/meta/) |

Adds, updates, deletes, and lists term custom fields.

  | 
| [wp term migrate](https://developer.wordpress.org/cli/commands/term/migrate/) |

Migrate a term of a taxonomy to another taxonomy.

  | 
| [wp term recount](https://developer.wordpress.org/cli/commands/term/recount/) |

Recalculates number of posts assigned to each term.

  | 
| [wp term update](https://developer.wordpress.org/cli/commands/term/update/) |

Updates an existing term.

  |

 _Command documentation is regenerated at every release. To add or update an example,
please submit a pull request against the corresponding part of the codebase._