Title: Export Bug
Last modified: March 27, 2020

---

# Export Bug

 *  Resolved [stickypixel](https://wordpress.org/support/users/stickypixel/)
 * (@stickypixel)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/)
 * Hi,
 * I’ve just spent a few hours trying to solve this problem. I wanted to put all
   my CPTs in code, so that they can be in version control. I exported all my CPTs
   as code, but in resulted in lots of the site breaking. I realise it’s because
   when you export as code, unless you have specifically set `publicly_queryable`
   as `true`, it will export as `false`, meaning the post won’t load when you go
   to its URL.
 * If you need any more info, just let me know..
 * Chris
    -  This topic was modified 6 years, 1 month ago by [stickypixel](https://wordpress.org/support/users/stickypixel/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [stickypixel](https://wordpress.org/support/users/stickypixel/)
 * (@stickypixel)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/#post-12591530)
 * ah, I see this was already reported / handled, sorry: [https://wordpress.org/support/topic/replacing-plugin-with-cptui_register_my_cpts-doesnt-work/](https://wordpress.org/support/topic/replacing-plugin-with-cptui_register_my_cpts-doesnt-work/)
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/#post-12591551)
 * So are you still needing some help with this? or did the steps mentioned in that
   thread end up helping you as well here?
 *  Thread Starter [stickypixel](https://wordpress.org/support/users/stickypixel/)
 * (@stickypixel)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/#post-12591560)
 * Nope, all good actually. Though, I would say that in case the value is missing,
   it should default to the WordPress default. e.g. In this case, `publicly_queryable`
   has a default value which is the same as `$public`..
 * From [https://developer.wordpress.org/reference/functions/register_post_type/](https://developer.wordpress.org/reference/functions/register_post_type/)
 * > If not set, the default is inherited from $public.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/#post-12591679)
 * Will need to check/confirm some parts, but i think it should be passing through
   to the defaults already, unless the export output is specifically saying `false`
   in this case for which I would need to amend things. I’ll check on that on my
   own soon.
 * Thanks for the feedback.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Export Bug’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)

 * 4 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/export-bug/#post-12591679)
 * Status: resolved