Term-related tables

WordPress terms can be simply described as categories and tags. This section consists of three tables for post category and tag-related information. Let's take a look at the relationships between term-related tables:

The three tables shown in the diagram are as follows:

  • wp_terms: This table contains master data for all new categories and tags, including custom taxonomies.
  • wp_term_taxonomy: This table is used to define the type of terms and the number of posts or pages available for each term. Basically, all the terms will be categorized as category, post-tags, or any other custom term created through plugins.
  • wp_term_relationships: This table is used to associate all the terms with their respective posts.
  • wp_termmeta: This table is used to add additional meta values related to taxonomies like categories and tags.