What Do WordPress's Default Database Tables Actually Store?
The Core Tables and What They Hold
WordPress's data model is more flexible than it might first appear, largely because wp_posts stores far more than just blog posts — pages, custom post types, and (under the classic order storage model) even WooCommerce orders all live in this same table, distinguished by a post type column. This flexible, generic structure is powerful but is also why understanding it matters for anyone doing custom development or direct database troubleshooting.
Table-by-Table Overview
wp_posts— the central content table, holding posts, pages, custom post types, and more, each tagged with a specific post type and status.wp_postmeta— arbitrary key/value metadata attached to posts, the mechanism behind custom fields and much of what plugins use to store post-specific data.wp_options— sitewide settings and configuration, from core WordPress settings to plugin-specific options.wp_usersandwp_usermeta— user accounts and their associated metadata, including role/capability assignments.wp_terms,wp_term_taxonomy, andwp_term_relationships— the three-table structure behind categories, tags, and any custom taxonomy, plus which content each term is assigned to.wp_commentsandwp_commentmeta— comment data and its metadata.- WooCommerce and other plugins add their own dedicated tables (like HPOS's order tables) for data that doesn't fit cleanly into this generic structure.
Why This Understanding Helps
- Recognizing this structure helps when troubleshooting directly in the database, understanding where a specific piece of data actually lives.
- It clarifies why some plugins need their own tables rather than fitting everything into the generic post/postmeta structure.
- Always back up before any direct database work, regardless of how well the structure is understood.
Need direct database troubleshooting or optimization done safely? See WordPress bug fix.