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 want to add 2 more rows (for voting up or down) to my default wordpress posts table. Would those rows be deleted when I update my WP version, or cause any other problem? An alternative would be to create a separate table but it's much faster and easier to query from 1 in my case.

share|improve this question
up vote 3 down vote accepted

First, I assume you're referring to columns, not rows. To answer your question, no, the upgrade process will not remove the extra columns from the posts table. That said, WordPress has the wp_postmeta table that should be used to store extra data about posts rather than adding columns to the posts table. I would suggest using the postmeta table instead of modifying the core database.

share|improve this answer
Thank you for the response! I wanted to add the columns to avoid complicated queries but I guess you're right. – at least three characters Nov 18 '10 at 3:23
I'd strongly suggest following the advice given, using the existing structure will cause you less problems long term, and it's really not that hard to formulate queries to the meta table. You can most likely rely on the existing WP functions to perform your post/meta queries to.. – t31os Nov 18 '10 at 23:28

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.