0

i am not good in php

but i am using advanced custom fields plugin to improve my web site , now in my website i using about 25 "text" advanced custom fields and 1 "choice - select" advanced custom field

and I also have a plugin like woocommerce it use about 15 custom fields

now i have about 40 custom field for every single post

i am using cache plugin so visitor will not query database but the plugin when it make cache it will query the database

my question is , i am worry about this a lot of custom fields may make performance issues in future when i have a lot of posts

i want your opinion if what i make is good or it will make performance issues ?

thanks alot

  • it likely will with enough posts but caching plugin may be able to mitigate that... it depends on alot of factors. plus what's alot of posts? 500 or 500000?.. 500 isn't that many. – Joel M Apr 1 '18 at 21:18
0

Like Joel M asked, it really depends on what you mean by "a lot of posts". It also depends a lot on if you're querying these posts in complicated ways.

I highly recommend you install the plugin Query Monitor (https://wordpress.org/plugins/query-monitor/). It will tell you how long various queries are taking. You can then create "a lot of [test] posts" and see if your queries start running slowly.

0

You can use the PHP functions serialize/unserialize to store the field that hold a lot of custom fields. So it's not depend how many fields you have.

0

The problem with having many meta fields is that it hurts all meta related queries, not just the ones related to the posts that will have 40 fields.

In general your overall design should avoid using meta for searching, at which point the amount of meta becomes less relevant, although it is still better to use one field per post when possible.

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.