When is it appropriate to create a new table in the WordPress database?

For a client we’ll need 29,000 terms (all the highschool’s in the US) and each term needs 6 meta items (address, phone…). My initial thought was to store the term meta information as suggested in this post but after looking through it again I will be using lots of terms and I wonder if it will overload the options table.

Is there a good time to create a new table? Would this qualify? Other thoughts on how to relate the HS that a person attends to the ‘post’ that will be their academic profile?

Read More

It was suggested that I make the ‘terms’ a Custom Post Type. I’m not opposed to that either but I fail to see how I’ll relate the CPT to multiple ‘authors’ since a school will have more than one student that attends it. Because of the multiple ownership of the content terms just seemed to fit better.

Related posts

Leave a Reply

1 comment

  1. As the article mentions, using wp_options is not a good idea when you have thousands of terms, mainly because there’s:

    • a lot of serialization involved OR
    • long option names (the limit is 64 characters)

    In this particular case, yes, it’s appropriate to create some custom tables.

    To save time, you can use this plugin (update more recently than Simple Term Meta):

    http://wordpress.org/extend/plugins/taxonomy-metadata/

    Having said that, it looks to me like a custom post type would be better suited for this.

    Take a look at my Posts 2 Posts plugin for relating highschools to whatever you were planning on relating them to.