My question : how many custom fields or even taxonomies WordPress can handle without affecting performance?

The reason I ask, is because I started building a custom theme and I might need to have around 10 to 20 custom fields, and thinking if this will affect the speed of the site.

I understand that speed also depends on server/hosting and number of visits, cache techniques, etc...

I also expect that a post with one custom field will be faster then one post with ten custom fields.

But, let's say a site that haves around 10,000 visits a day with a post with one custom field will the speed difference be much more different from a site with the same 10 000 visits a day with a post with 10 custom fields.

Just trying to figure it out how much of a difference a custom field can make.

Also in terms of custom searching using wp_query and custom fields parameters will the speed be affected.

Thank you.

1 Answer 1


In the case of custom fields- if you fetch them in a single query to the database, fetching one or ten is not going to differ much, it's the same relatively simple query in both instances. If you were to do a lot of complex meta queries on those fields you'd definitely see a performance hit.

I think same for taxonomy, if you're doing complex taxonomy queries, that's a big hit. Simple queries to fetch terms are relatively cheap.

Searching will certainly tax the server more if you've got ten times as much data, text searches are pretty expensive.

  • thank you. By single query to the database, do you mean custom query? At the moment I use: codex.wordpress.org/Function_Reference/get_post_meta will this make 10 hits to the database to grab the 10 custom fields of the same post?
    – yeope
    Commented Jun 6, 2011 at 17:56
  • @yeope - a single query meaning either your own sql, or the underlying query generated when you use a WordPress function. I believe all of the simple meta functions ultimately call get_metadata, you can see how it works in /wp-includes/meta.php. It gets the whole object and puts it in cache, or grabs from cache if it's already there. It then checks if a key was passed or not and either returns just that key or the whole object.
    – Milo
    Commented Jun 6, 2011 at 18:18

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.