I'm developing a custom plugin for a rather large website.

Currently I'm using Custom Post Types (over 10 types), all of them have several Advanced Custom Fields to store their data.

It is expected that there will be over 100k custom posts at some future point (rather sooner than later). ACF uses the wp_postmeta table, and stores each field in a seperate table row, which could lead to over 1 million entries in the postmeta table.

I have little experience with a project of this size, so my question is: is it safe to use ACF (and CPT's) in this case performance-wise?

Or would it be better if I added a custom table for each post type, that stores all the custom fields of a post in ONE table row?

  • 2
    Seems like a question to ask on the ACF forums.
    – rudtek
    Commented Aug 28, 2019 at 15:45
  • It depends enormously on what you do with your post meta. Simply having a lot of it is just fine, but if you tried to display a list of posts based on their post meta values, it'll be a performance nightmare. It could also be that your host simply can't handle a large database no matter what you do. Eitherway this isn't an ACF forum, you should consult ACF support for ACF specifics
    – Tom J Nowell
    Commented Aug 28, 2019 at 16:03
  • My question is rather what the best practice is when handling a lot of data in a Wordpress website, be it Custom Post Types with ACF or something completely different, so I'm not sure it's off topic. And thanks for the answer. Yes, in some cases I'd need to query based on one of their fields so I suppose it's better to find another way, at least for those fields.
    – jnaklaas
    Commented Aug 29, 2019 at 7:31
  • Also, I'm not even sure custom post types is the way to go...
    – jnaklaas
    Commented Aug 29, 2019 at 7:39