Changes of Database Structure in WordPress 2.3

Posted on January 27, 2008
Filed Under WordPress Database |

The new release of WordPress 2.3 has some major database sturcture changes. There are still 10 tables, - 3 new tables were added, and 3 tables were removed:

WordPress 2.2 tables:

(1) wp_categories (removed)
(2) wp_comments
(3) wp_link2cat (removed)
(4) wp_links
(5) wp_options
(6) wp_post2cat (removed)
(7) wp_postmeta
(8) wp_posts
(9) wp_usermeta
(10) wp_users

WordPress 2.3 tables:

(1) wp_comments
(2) wp_links
(3) wp_options
(4) wp_postmeta
(5) wp_posts
(6) wp_term_relationships (added)
(7) wp_term_taxonomy (added)
(8) wp_terms (added)
(9) wp_usermeta
(10) wp_users

The main purpose of this change is to make WordPress support taxonomy such as flexable tagging features. WP’s competititor Drupal has great taxonomy features since long time ago, now WP seem to catch up.

As you can see, the categories related tables were removed from the new version. Now category, and any other classification oriented objects are called “terms”. They now go to the wp_terms table. The relationship between posts and categories (terms) is resolved by data in wp_term_relationships table. The tagging is handled by wp_term_taxonomy table.

Comments

Leave a Reply




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word