Understanding the WordPress database

WordPress has a built-in database with 12 core database tables. These tables handle the core functionality for blogging and content management. We can use these tables for custom requirements beyond the default features, as well as create custom tables alongside these core tables. The following diagram outlines the relationship between the core database tables:

Let's take a look at the functionality of each table:

  • wp_posts: This table contains all the posts and pages of your website with details such as post name, author, content, status, and post type.
  • wp_postmeta: This table contains all the additional details for each post as key-value pairs. By default, it will contain details such as page templates, attachments, and edit locks. Also, we can store any post-related information as new key-value pairs.
  • 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 categories, 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 such as categories and tags.
  • wp_users: All the registered users will be stored in this table with their basic details, such as names, e-mail addresses, usernames, and passwords.
  • wp-usermeta: This table is used to store additional information about the users as key-value pairs. We have the ability to add any user-related information as new key-value pairs.
  • wp_options: This table acts as the one and only independent table in the database. In general, it is used to save application-specific settings that don't often change. 
  • wp_comments: This table contains the user feedback for posts and pages. Comment-specific details such as author, e-mail address, content, and status are saved in this table.
  • wp_commentmeta: This table contains additional details about each comment. By default, this table will not contain much data as we are not associating advanced comment types in typical situations.
  • wp_links: This table contains the necessary internal or external links. This feature is rarely used in content management systems.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.10.32