On close inspection of WP, I realize that almost all the information is in the table posts and postmeta.

Do you think we should follow this example and put all our information in these table posts & postmeta?

I am creating a plugin "Address Book", do I need to create a new table wp_addressbook or do I insert my address book in the table posts (will I have to choose the fields)?

What are the advantages and disadvantages of "putting everything" in the posts table?

1 Answer 1


Using posts & postmeta:

There is nothing wrong in using posts and postmeta table for custom database requirements.

In WordPress, although posts & postmeta table was originally there to create blog posts, later it evolved to cover many different sorts of database requirements. Using Custom Post Types, Post Meta & Custom Taxonomies, you can satisfy most database requirements generally used in web development.

In your case, you may use Custom Post Types (for address book), Post Meta (for custom address book fields) & Custom Taxonomies (for custom categorization or grouping of address book entries).


  • You'll be able to use tried and tested WordPress core functions to manage the data.

  • Tons of Plugins & Themes will support this, so you'll be able to use them to enhance your development further.


  • The database will not be 100% tidy, i.e. there will be redundant columns.

  • DB query may not be 100% optimized (may be 99%) compared to a custom DB structure.

Check WordPress Database structure to make a more informed decision.

Creating custom DB structure:

You really don't need to create custom DB tables for this. However, if you feel necessary, you may follow this doc.


  • You may design a 100% tidy relational DB structure, i.e. no redundancy.

  • You may optimize 100% to your heart's content.


  • You'll have to spend a ton of time to apply all the security, efficiency & usability measures already taken care of in WordPress core and many useful optimization related plugins.

  • Available plugin & theme compatibility will be difficult to maintain.

  • All the time spent may not worth the little benefit you may or may not gain.

  • Hello, Thank you for your reply and your clarification. I think I'll use the tables "posts ..." Thank you so much for your help and time. cordially
    – Acquatella
    Apr 6, 2017 at 7:24
  • You are welcome @Acquatella. Now please select this as accepted answer so that other people with similar question may find it easily in the future.
    – Fayaz
    Apr 6, 2017 at 9:08

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.