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.


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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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