[wp-hackers] questioning the efficiency of using custom post types

William P. Davis will.davis at gmail.com
Sun Nov 6 22:27:28 UTC 2011


The custom post types/custom taxonomies/meta data setup is incredibly
powerful. If you don't believe me, look at
http://wordpress.org/extend/plugins/zoninator/ — no custom tables, all done
using metadata, and it's very efficient.

It all depends on what you're trying to do, but in the huge majority of
cases you're much better off using CPTs than custom tables. As mentioned
before, custom tables can cause problems down the road with
forward-compatibility. When you're talking about joining a dozen or so
extra tables on every page load you're adding a lot of overhead. And lord
forbid if you ever have to hand your code off to someone else.

You should always build your site like someday it will be twice the size it
is now. Take it from someone who used custom tables early on only to find
them horrendously inefficient and hard to maintain down the road: Don't do
it!


More information about the wp-hackers mailing list