WordPress 2.3 Database Schema Changes

WordPress 2.3 changes the database schema in three places. The biggest change is the taxonomy related changes I discussed earlier. Since taxonomy was going to cause backward compatibility breaks in the schema, we decided we might as well break it thoroughly and create something we liked. Thus the categories, post2cat, and link2cat tables were dropped and replaced by three new tables. Plugins that reference the old tables will break. They will need to be updated to either use API, preferably, or use SQL that references the new tables instead of the old ones.

The other two changes are small and low-impact. A new status of ‘pending’ was added to the post_status field of the posts table. This won’t affect most plugins. Plugins that check post status might be affected. Those plugins can do some defensive programming to insulate themselves against new status additions.

Finally, several unused fields were dropped from the options table. option_can_override, option_type, option_width, option_height, option_description, and option_admin_level are now gone. These fields have been unused for years. The time had come to finally drop them and clean up the options table.

51 thoughts on “WordPress 2.3 Database Schema Changes

  1. Thanks for this useful information. I’ll translate the important parts into Turkish and publish in my site for Turkish users. It seems that we will have to fix all the compatibility problems with the former releases of the plugins that we are using.

  2. There is a reason why many bloggers aren’t even on 2.2 yet. It’s this we’ll change the tables and the plugins will break.

    How can we reduce the plugin is not compatible cycle?

  3. The big question is….Will WordPress 2.3 be more secured? and about the javascript — it is very slow still – many browsers are having problem with it.

  4. Is the pending status change to post in the future instead of just post dating a post? Or is it more for Multiple user based WPblogs for editors/admin to flag as “approved”?

  5. Does anyone know if there will be a migration path from Ultimate Tag Warrior tags (and permalinks) to WordPress 2.3 tags? If not, I’ll be stuck on my current version forever. I’m way too dependent on those tags and the URLs are all in the search engines now.

  6. @technabob:
    Yes, WP has a converter for UTW tags(as well as a Simple Tagging Importer, not sure about others).

    WP also has a Category -> Tag converter(All or a select few if you want).

  7. I was reading about this, and i’m not PHP/MySQL skilled, but since i work with css/xhtml i tend to understand some code. MySQL syntax is very understable.

    So, if i have a plugin that relays on the old categories tables,


    $wpdb->get_results("SELECT cat_ID as id, cat_name as name FROM $wpdb->categories WHERE category_parent = '$parent_id'");

    shoulde i make the select “id as id” “slug as name” FROM $wpdb->taxonomy WHERE (get only items with taxonomy categoy) ?

Leave a Reply to RyanCancel reply