Knowledgebase

The WordPress Database Structure Print

  • databasesphpmyadmin, databases, wordpress, database, plugins, troubleshooting, domainrenewal, php
  • 0

What each table holds.

THE CORE TABLES

wp_posts: posts, pages, products, revisions, attachments, menu items. Almost all content, distinguished by post_type. wp_postmeta: additional data attached to posts. Frequently the largest table. wp_options: settings, for both core and plugins. wp_users and wp_usermeta: accounts and their data. wp_comments and wp_commentmeta: comments. wp_terms, wp_termmeta, wp_term_taxonomy, wp_term_relationships: categories, tags and their links to content.

THE PREFIX

wp_ is the default and is configurable. Check yours in wp-config.php.

Every query and every direct edit must use the actual prefix.

WHAT GROWS

postmeta, which accumulates metadata including orphaned rows from deleted content options, particularly with expired transients Plugin tables, which are added alongside the core ones

WHAT MATTERS MOST

options, because autoloaded rows load on every request posts, because revisions multiply it

WHERE TO BE CAREFUL

Deleting from posts without removing the corresponding postmeta leaves orphans.

Use a maintenance plugin rather than deleting directly.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot