首页 > 代码库 > wordpress数据表结构

wordpress数据表结构

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

Table: wp_links

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_visible

INDEX

None

link_visible

Table: wp_options

Field

Type

Null

Key

Default

Extra

option_id

bigint(20) unsigned

 

PRI

NULL

auto_increment

option_name

varchar(64)

 

 

 

 

option_value

longtext

 

 

 

 

autoload

varchar(20)

 

 

yes

 

Indexes

Keyname

Type

Cardinality

Field

PRIMARY

PRIMARY

184

option_id

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

FieldDes

Field

Type

Null

Key

Default

Extra

文章ID

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

 

发布日期gmt

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状态

ping_status

varchar(20)

 

 

open

 

文章密码

post_password

varchar(20)

 

 

 

 

文章缩略名

post_name

varchar(200)

 

IND

 

 

 

to_ping

text

 

 

 

 

已经ping过的连接

pinged

text

 

 

 

 

修改时间

post_modified

datetime

 

 

0000-00-00 00:00:00

 

修改时间gmt

post_modified_gmt

datetime

 

 

0000-00-00 00:00:00

 

 

post_content_filtered

longtext

 

 

 

 

父文章,主要用于PAGE

post_parent

bigint(20) unsigned

 

 

0

FK->wp_posts.ID

 

guid

varchar(255)

 

 

 

 

菜单排序ID

menu_order

int(11)

 

 

0

 

文章类型

post_type

varchar(20)

 

IND Pt1

post

 

MIME类型

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

FieldDes

Field

Type

Null

Key

Default

Extra

分类ID

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

FieldDes

Field

Type

Null

Key

Default

Extra

文章ID

object_id

bigint(20) unsigned

 

PRI Pt1

0

 

分类方法ID

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

FieldDes

Field

Type

Null

Key

Default

Extra

分类方法ID

term_taxonomy_id

bigint(20) unsigned

 

PRI

 

auto_increment

分类条目ID

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

FieldDes

Field

Type

Null

Key

Default

Extra

主键ID

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)

 

 

 

 

用户url

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

wordpress数据表结构