When you use the register post type and register taxonomy functions in your functions.php, where do all that setting info get stored in regards to the CT's and CPT's you are registering?

I'm talking about the settings such as whether the CPT is public or not, which custom post types work with which registered taxonomies, whether custom taxonomy is hierarchical or not etc.

Is that all on the server memory? If so, what's the reason of not saving it on the database -for example in wp_options table?

Isn't the wp_options table specifically deal with stuff like this?

1 Answer 1


When you register post type it is stored in a global var name $wp_post_types and the taxonomies are stored in a global var named $wp_taxonomies

Its all in the memory since you need it all and if it was stored in the database you would need to pull it from the database and then it would still be in the memory.

  • Very very good answer. Thx. But, consider this scenario; Say, you got the famous custom post type ui plug in and you got a few cpts/cts with it. But then you deactivate it and perhaps delete it once and for all to bring in another similar plug in. But you haven't configured the new one yet so it does not know about the cpts and the cts that the first plug in registered. And with this in mind, you restart wordpress. Isn't the site unfunctional at this moment - cause there is nothing in the database to tell wordpress about those cpt's and ct's? See my point? May 15, 2012 at 16:58
  • @AverageJoe If you use cptui they are stored in the options table as cptui_taxonomies and cptui_post_types - just found this whilst trying to reorder some taxonomies in the admin menu Oct 15, 2016 at 16:07

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.