WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to extend some wp tables (wp_posts, wp_comments, wp_users) to store some additional fields. I can't use metadata because I need to query those values directly via MySQL. I need an help to choose if it's better to extend the original table or to define an additional one with those fields, with a 1-1 relationship to the original one. This second case will require an additional JOIN. Thanks.


share|improve this question
up vote 1 down vote accepted

The second approach (joining additional table) is better for several reasons.

share|improve this answer
Thank you, the additional fields will have many updates. Thanks also for the useful links. – eVolts Oct 24 '11 at 14:58

Adding fields to WP's tables seems like a bad idea...what about using post meta and just JOINing on the post_meta table?

share|improve this answer
I need to have one record per element and not n records (or need to encode an array, because I need to query each field). – eVolts Oct 24 '11 at 14:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.