WordPress 3.4 Tables (11)

Content Index
[Hide]
WordPress 3.4 Tables (11)
Table Name Description Relevant Area(s) of WordPress User Interface
wp_commentmeta Each comment features information called the meta data and it is stored in the wp_commentmeta.
wp_comments The comments within WordPress are stored in the wp_comments table.
wp_links The wp_links holds information related to the links entered into the Links feature of WordPress.
wp_options The Options set under theAdministration > Settings panel are stored in the wp_options table. See Option Reference for option_nameand default values.
wp_postmeta Each post features information called the meta data and it is stored in the wp_postmeta. Some plugins may add their own information to this table.
wp_posts The core of the WordPress data is the posts. It is stored in thewp_posts table. Also Pages and navigation menu items are stored in this table.
wp_terms The categories for both posts and links and the tags for posts are found within the wp_terms table.
wp_term_relationships Posts are associated with categories and tags from the wp_terms table and this association is maintained in the wp_term_relationships table. The association of links to their respective categories are also kept in this table.
wp_term_taxonomy This table describes the taxonomy (category, link, or tag) for the entries in the wp_terms table.
wp_usermeta Each user features information called the meta data and it is stored in wp_usermeta.
wp_users The list of users is maintained in table wp_users.

Table Details

The following are the specific fields in each of the tables created during the standard WordPress installation.

Table: wp_commentmeta

Field Type Null Key Default Extra
meta_id bigint(20) unsigned PRI NULL auto_increment
comment_id bigint(20) unsigned IND 0 FK->wp_comments.comment_id
meta_key varchar(255) YES IND NULL
meta_value longtext YES NULL

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 0 meta_ID
comment_id INDEX none comment_id
meta_key INDEX none meta_key

Table: wp_comments

Field Type Null Key Default Extra
comment_ID bigint(20) unsigned PRI NULL auto_increment
comment_post_ID bigint(20) unsigned IND 0 FK->wp_posts.ID
comment_author tinytext
comment_author_email varchar(100)
comment_author_url varchar(200)
comment_author_IP varchar(100)
comment_date datetime 0000-00-00 00:00:00
comment_date_gmt datetime IND & IND Pt2 0000-00-00 00:00:00
comment_content text
comment_karma int(11) 0
comment_approved varchar(20) IND & Ind Pt1 1
comment_agent varchar(255)
comment_type varchar(20)
comment_parent bigint(20) unsigned 0 FK->wp_comments.ID
user_id bigint(20) unsigned 0 FK->wp_users.ID

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 1 comment_ID
comment_post_ID INDEX None comment_post_ID
comment_approved_date_gmt INDEX None comment_approved
comment_date_gmt
comment_date_gmt INDEX None comment_date_gmt
comment_parent INDEX None comment_parent

Field Type Null Key Default Extra
link_id bigint(20) unsigned PRI NULL auto_increment
link_url varchar(255)
link_name varchar(255)
link_image varchar(255)
link_target varchar(25)
link_description varchar(255)
link_visible varchar(20) IND Y
link_owner bigint(20) unsigned 1
link_rating int(11) 0
link_updated datetime 0000-00-00 00:00:00
link_rel varchar(255)
link_notes mediumtext
link_rss varchar(255)

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 7 link_ID
link_category INDEX None link_category
link_visible INDEX None link_visible

Table: wp_options

Field Type Null Key Default Extra
option_id bigint(20) unsigned PRI Pt1 NULL auto_increment
option_name varchar(64) PRI Pt3 & IND
option_value longtext
autoload varchar(20) yes

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 184 option_id
blog_id
option_name
option_name UNIQUE 184 option_name

Table: wp_postmeta

Field Type Null Key Default Extra
meta_id bigint(20) unsigned PRI NULL auto_increment
post_id bigint(20) unsigned IND 0 FK->wp_posts.ID
meta_key varchar(255) YES IND NULL
meta_value longtext YES NULL

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 13 meta_ID
post_id INDEX 15 post_id
meta_key INDEX 7 meta_key

Table: wp_posts

Field Type Null Key Default Extra
ID bigint(20) unsigned PRI & IND Pt4 auto_increment
post_author bigint(20) unsigned 0 FK->wp_users.ID
post_date datetime IND Pt3 0000-00-00 00:00:00
post_date_gmt datetime 0000-00-00 00:00:00
post_content longtext
post_title text
post_excerpt text
post_status varchar(20) IND PT2 publish
comment_status varchar(20) open
ping_status varchar(20) open
post_password varchar(20)
post_name varchar(200) IND
to_ping text
pinged text
post_modified datetime 0000-00-00 00:00:00
post_modified_gmt datetime 0000-00-00 00:00:00
post_content_filtered longtext
post_parent bigint(20) unsigned 0 FK->wp_posts.ID
guid varchar(255)
menu_order int(11) 0
post_type varchar(20) IND Pt1 post
post_mime_type varchar(100)
comment_count bigint(20) 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 2 ID
post_name INDEX None post_name
type_status_date INDEX None post_type
post_status
post_date
ID
post_parent INDEX None post_parent
post_author INDEX None post_author

Table: wp_terms

Field Type Null Key Default Extra
term_id bigint(20) unsigned PRI auto_increment
name varchar(200)
slug varchar(200) UNI
term_group bigint(10) 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 2 term_ID
slug UNIQUE 2 slug
name Index none name

Table: wp_term_relationships

Field Type Null Key Default Extra
object_id bigint(20) unsigned PRI Pt1 0
term_taxonomy_id bigint(20) unsigned PRI Pt2 & IND 0 FK->wp_term_taxonomy.term_taxonomy_id
term_order int(11) 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 8 object_id
term_taxonomy_id
term_taxonomy_id INDEX None term_taxonomy_id

Table: wp_term_taxonomy

Field Type Null Key Default Extra
term_taxonomy_id bigint(20) unsigned PRI auto_increment
term_id bigint(20) unsigned UNI Pt1 0 FK->wp_terms.term_id
taxonomy varchar(32) UNI Pt2
description longtext
parent bigint(20) unsigned 0
count bigint(20) 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 2 term_taxonomy_id
term_id_taxonomy UNIQUE 2 term_id
taxonomy
taxonomy INDEX None taxonomy

Table: wp_usermeta

Field Type Null Key Default Extra
umeta_id bigint(20) unsigned PRI NULL auto_increment
user_id bigint(20) unsigned ‘0’ FK->wp_users.ID
meta_key varchar(255) Yes IND NULL
meta_value longtext Yes IND NULL

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 9 umeta_id
user_id INDEX None user_id
meta_key INDEX None meta_key

Table: wp_users

Field Type Null Key Default Extra
ID bigint(20) unsigned PRI NULL auto_increment
user_login varchar(60) IND
user_pass varchar(64)
user_nicename varchar(50) IND
user_email varchar(100)
user_url varchar(100)
user_registered datetime 0000-00-00 00:00:00
user_activation_key varchar(60)
user_status int(11) 0
display_name varchar(250)

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 1 ID
user_login_key INDEX None user_login
user_nicename INDEX None user_nicename

Multisite Table Overview

This section is the overview of the tables created for use with the Multisite feature of WordPress. These tables are created via the processes under Administration > Tools > Network.

These tables are considered the multisite global tables.

WordPress 3.0 Multisite Tables
Table Name Description Relevant Area(s) of WordPress User Interface
wp_blogs Each site created is stored in the table, wp_blogs.
wp_blog_versions The current database version status of each site is maintained in thewp_blogs_versions table and is updated as each site is upgraded.
wp_registration_log The wp_registration_log records the admin user created when each new site is created.
wp_signups This table holds the user that have registered for a site via the login registration process. User registration is enable inAdministration > Super Admin >Options.
wp_site The wp_site table contains the main site address.
wp_sitecategories If global terms (global_terms_enabled = true) are enabled for a site thewp_sitecategories table holds those terms.
wp_sitemeta Each site features information called the site data and it is stored in wp_sitemeta. Variousoption information, including the site admin is kept in this table.
wp_users The list of all users is maintained in table wp_users. Multisite add two fields not in the stand-alone version.
wp_usermeta This table is not re-create for multisite, but meta data of usersfor each site are stored inwp_usermeta.
Site Specific Tables The data of the main site are stored in existing unnumbered tables. The data of additional sites are stored in new numbered tables.



Multisite Table Details

The following describe the tables and fields created during the network installation. Note that a global set of tables is created upon creation of the network, and site-specific tables are established as each site is created.

Table: wp_blogs

Field Type Null Key Default Extra
blog_id bigint(20) unsigned PRI NULL auto_increment
site_id bigint(20) unsigned IND 0
domain varchar(200) NO 0
path varchar(100) NO
registered datetime NO 0000-00-00 00:00:00
last_updated datetime NO 0000-00-00 00:00:00
public tinyint(2) NO 0
archived enum(‘0′,’1’) NO 0
mature tinyint(2) NO 0
spam tinyint(2) NO 0
deleted tinyint(2) NO 0
lang_id int(11) NO 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 2 blog_id
domain INDEX none domain(50),path(5)
lang_id INDEX none lang_id

Table: wp_blog_versions

Field Type Null Key Default Extra
blog_id bigint(20) unsigned PRI 0 FK->wp_blogs.blog_id
db_version varchar(20) NO
last_updated datetime NO 0000-00-00 00:00:00

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 2 blog_id
db_version INDEX none db_version

Table: wp_registration_log

Field Type Null Key Default Extra
ID bigint(20) unsigned PRI NULL auto_increment
email varchar(255) NO
IP varchar(30) NO
blog_id bigint(20) unsigned PRI 0 FK->wp_blogs.blog_id
date_registered datetime NO 0000-00-00 00:00:00

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 1 ID
IP INDEX none IP

Table: wp_signups

Field Type Null Key Default Extra
domain varchar(200) NO 0
path varchar(100) NO
title longtext NO
user_login varchar(60) NO IND
user_email varchar(100) NO
registered datetime NO 0000-00-00 00:00:00
activated datetime NO 0000-00-00 00:00:00
active tinyint(1) NO
activation_key varchar(50) NO
meta longtext

Indexes

Keyname Type Cardinality Field
activation_key INDEX None activation_key
domain INDEX None domain

Table: wp_site

Field Type Null Key Default Extra
id bigint(20) unsigned PRI NULL auto_increment
domain varchar(200) NO 0
path varchar(100) NO

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 1 id
domain INDEX none domain,path

Table: wp_sitecategories

Field Type Null Key Default Extra
cat_id bigint(20) unsigned NO PRI NULL auto_increment
cat_name varchar(55) NO
category_nicename varchar(200) NO
last_updated timestamp NO

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 9 cat_id
category_nicename INDEX None category_nicename
last_updated INDEX None last_updated

Table: wp_sitemeta

Field Type Null Key Default Extra
meta_id bigint(20) unsigned PRI NULL auto_increment
site_id bigint(20) unsigned ‘0’ FK->wp_site.site_id
meta_key varchar(255) Yes IND NULL
meta_value longtext Yes IND NULL

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 9 meta_id
meta_key INDEX None meta_key
site_id INDEX None site_id

Table: wp_users

Field Type Null Key Default Extra
ID bigint(20) unsigned PRI NULL auto_increment
user_login varchar(60) IND
user_pass varchar(64)
user_nicename varchar(50) IND
user_email varchar(100)
user_url varchar(100)
user_registered datetime 0000-00-00 00:00:00
user_activation_key varchar(60)
user_status int(11) 0
display_name varchar(250)
spam tinyint(2) NO 0
deleted tinyint(2) NO 0

Indexes

Keyname Type Cardinality Field
PRIMARY PRIMARY 1 ID
user_login_key INDEX None user_login
user_nicename INDEX None user_nicename

本文链接:WordPress 3.4 Tables (11)

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:Rexdf,谢谢!^^


This entry was posted in 网站建设 and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.

*

:zsmilebig: :zsadbig: :zwiredbig: :zgreenhappy: more »

This site uses Akismet to reduce spam. Learn how your comment data is processed.