I would like to try build a simple plugin that collects and stores the name and email address of the person who filled in the form. I realize there are probably dozens of plugins out there that do this already but would like to build my own, for practice.

If the user enters their name and email address, where should this be stored? Should it be created as a "subscriber" custom post type or a whole new table in the WP database? What are your thoughts? I'd like to eventually export the data to a .csv file if that influences where it should be stored.

1 Answer 1


There are multiple storage mechanisms in WP so it can be bit tricky to pick one and sometimes there is no single right choice.

Let's examine your criteria for storage:

  • persistent (you don't want data just evaporating)
  • processable (you want to export it and probably navigate)
  • simple to implement (you don't want go building something (semi)custom just for the heck of it)
  • extensible (in case you want to capture more data down the road and such)

As for me the best storage to satisfy these condition would be using custom post type. It comes with a lot of functionality out of the box (like admin interface), requires no messing with storage (custom tables or whatever) and is perfectly suited to store arbitrary information in custom fields.

  • Good points. I think I'll try with this route. Thanks
    – Andrew
    Commented Oct 10, 2012 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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