WordPress Database

Custom Database Tables

Database Tables

  • wp_commentmeta
    • meta_id
    • comment_id
    • meta_key
    • meta_value
  • wp_comments
  • wp_links
  • wp_options
  • wp_postmeta
    • Used for both posts AND pages. This is where custom fields attached to a post/page would store their data.
    • $wpdb->postmeta
    • meta_id
    • post_id
    • meta_key
    • meta_value
  • wp_posts
    • All content types are kept in the wp_posts table and are distinguished from one another by a post type. Default post types are post, page, attachment, revision, and navigation menu.
    • Navigation Menu – nav_menu_item – This is not an entire menu but a single navigational item on a larger menu.
  • wp_terms
    • For the taxonomy system, contains categories, tags, and custom taxonomies.
  • wp_term_relationships
    • When terms are hierarchical the relationship between one term and another is stored here. This table is being merged into wp_terms in the future.
  • wp_term_taxonomy
    • Used to determine which terms are actually the root level of a taxonomy.
  • wp_usermeta
  • wp_users
%d bloggers like this: