Support » Plugins » Hacks » WordPress Database Tables and Plugins

  • Resolved sylverCode


    I’ve noticed few plugins changing the structure of the existing WP tables by adding new columns.
    e.g. The Admin Management Xtended plugin adds “menu_order” column to wp_posts table so you can order posts manually.

    Is that wise?
    Isn’t it better to create a separate table for your plugins and then link the data with WP tables data?
    Does WP overwrite its tables structure to default when updating to a newer version?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    I suppose it’s a matter of opinion. I agree with you, it’s unwise, better to join in your own table. It does complicate queries a bit.

    WP does not normally fiddle with table structure between updates, but it has happened in the past, and could happen in the future. At which time the data in the extra columns could be lost, or the update could fail. Neither is a very desirable outcome. Your own tables is certainly the safest approach, and IMO, the only proper approach.

    Thanks! That’s the answer I was looking for.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Database Tables and Plugins’ is closed to new replies.