Skip to:

Extend existing table or store in options table?

  • Boone Gorges


    I’m playing with writing a plugin that adds some data about profile fields but I’m not sure where to store the data. The logical place is in wp_bp_xprofile_fields, where I’d add a column or two to store my additional data. I was hoping that someone could tell me whether this is wise. If the structure of that table changes in the future, will upgrade scripts erase any additional columns I’ve added? Or are there other perils?

    I can always keep my new data in an array in the options table for my BP blog, of course, and avoid any potential problems. But I’d rather put data where it makes sense.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Jeff Sayre


    I would not add extra fields to any of the core tables. Instead, either create a new table, or if you don’t have too much data to store, you could use wp_usermeta, storing data as key, value pairings.

    Boone Gorges


    Thanks, Jeff. You’ve confirmed the bad feeling about it I already had! I’ll find another method.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Extend existing table or store in options table?’ is closed to new replies.
Skip to toolbar