[]RSS

About Archives Artwork Comic Contact Philosophy Projects Tags

WordPress Schema

November 6th, 2005 in Rants. Weblog

I was playing with some yesterday and noticed a few stupid funny interesting things about the WordPress schema:

  • It uses unsigned BIGINT(20) for the post indexes, so it supports up to 18,446,744,073,709,551,615 posts
  • It applies each of the known column-naming conventions I’ve seen in the past 15 years: post_id, postID, ID, and id
  • It has a handful of depreciated columns, and even more de-normalized columns

The schema works, and WP is a useful tool, but it is always funny interesting to see what’s hidden beneath the surface. Wordpress has grown quickly over the years, and been passed between a few core teams of developers. The fact that it’s inconsistent is natural (and expected).

The goal of my php-playtime was to replace WP in a few hours, as I assumed that the schema was sane. I succeeded, but spent most of the time cleaning up the schema, so that I didn’t choke on my tea laughing at the weirdness. It was an entertaining excercise too, as it gave me time think about what I really want in a writing tool (as I’m never exactly sure if I should bother rewriting it or not).

One Response to “WordPress Schema”

  1. warpedvisions.org » Blog Archive » Listing categories using WordPress 2.3’s new taxonomy system says:
    October 6th, 2007 at 3:59 pm

    The new taxonomy approach introduces the possibility of displaying better clusters of categories, by including tags in the mix. It also cleans up the SQL from the previous releases with simpler ways of getting count and a clearer relationship mechanism. The table design is clean too, a big improvement over past schemas.

 

Leave a Reply

Subscribe to comments