≡ Menu

Chapter 4: WordPress Database structure and important tables to know

WordPress Database structure and important tables to know

Once you install wordpress the tables are automatically created and configured.

Here are some of the important tables and what they perform for your blog.

wp_options – Any options that have been set in the settings panel are stored in this table

wp_posts – wp_posts contains all of the data about posts and their associated data. This table is very heavily used and contains all of a site’s content

wp_terms – This table stores content such as tags and categories that posts are classified with

wp_term_relationships – This table is responsible for maintaining the relationships between posts and their associated categories and tags. There is a MySQL relationship set up here as well: the table is actually connected to both posts and terms via the wp_ term_taxonomy table

wp_term_taxonomy – This handles tracking what type of taxonomies are associated with posts. It links back to wp_terms as well as wp_term_relationships and just logs associations with categories, tags, and so on

wp_usermeta – Another meta table, wp_usermeta handles any optional metadata associated with wp_users

wp_users – wp_users contains all of the data pertaining to WordPress users, including info such as usernames, admin rights, and encrypted passwords

wp_commentmeta – Any metadata associated with comments, such as keys and values, are stored in this database. It does not hold metadata such as author and date submitted, but rather miscellaneous data that WordPress occasionally uses. This data is sometimes optional or not used. It relates directly to wp_ comments

wp_comments – This table contains all comments made on WordPress posts and pages, as well as all associated data like the author, their email address, the date submitted, and the post where the comment was left

Full table relationship diagram

Chapter 5: Set up .Htaccess and robots.txt

go to WordPress Training for non-techies main page