0

I'm developing blacklist plugin for Woocommerce. Can't decide, which way is better for data storage without a custom database creation. Admin can add some user data to blacklist (for example email, name, IP, address). I need to store this data with ability to search. At this moment, I can store a data as:

1) wp_posts with wp_post_meta. Post title as blacklist value (blacklist@gmail.com), post meta as blacklist value type (email).

Pros: built-in search, built-in optimization

Cons: increasing wp_posts size (especially for woocommerce websites, where items are also in wp_posts)

2) Store data as taxonomy tree. For example, parent taxonomy term is value type (email), childs are blacklist value (blacklisted@gmail.com).

Pros: flexible structure, separation from wp_posts table

Cons: bad performance on search, no built-in search

3) Store data as option. For example, option name is {value_type}_{value_slug} and option value is value.

Pros: good performance

Cons: problem in search (you can get option by exact name)

4) Any advices?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.