Title: Export/Import
Last modified: August 21, 2016

---

# Export/Import

 *  Resolved [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/)
 * Is there any way to export custom post types and taxonomies created with CPTUI
   on one site and import them into another site?
 * [http://wordpress.org/plugins/custom-post-type-ui/](http://wordpress.org/plugins/custom-post-type-ui/)

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

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4517962)
 * Funny that you mention this because it’s something that will be made a lot easier
   once I’m done with 0.9(Not soon, still).
 * With the current stable version, the best you’ll have is finding the right options
   in the wp_options table and import those into the new site’s database. As long
   as you get the option keys the same, it should be pretty flawless.
 * The way that this will work easier in 0.9 will be just some quick copy/pasting
   and submitting through a form. All of the values will be provided for you so 
   literal just copy/paste.
 * Something I’ll want to note at the time is that the user will need to upgrade
   to 0.9 before this will work well, but that’s mostly internal notes.
 *  Thread Starter [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4517998)
 * Thanks, I generally create the same post types an taxonomies on new sites, or
   at least I try to stay consistent when naming them. While it doesn’t take that
   long with the plugin it would be faster yet if I could just do an import.
 * Even the copy past… I could create a file with things I can just past into the
   form. Will be looking forward to it.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4518001)
 * Hube2, here’s a preview of what this functionality will look like.
 * [http://cl.ly/image/3u3j3Z0l433Z](http://cl.ly/image/3u3j3Z0l433Z)
 * Say you’re in the admin for the new location. The left side is where you’ll paste
   in content from the old site. What you’ll paste in is the content from the right
   side, from inside the old site. Same exact setup for post types.
 *  Thread Starter [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4518018)
 * You got me curious so I did a little digging into the database to look at your
   options and I have to say it got me a little excited 😛 and made the gears start
   to turn.
 * Many people would create custom post types and then export and put it into the
   functions file of the theme or into a plugin. I don’t like doing that, things
   have a habit of changing more than we think they will. That’s why, even when 
   I’m creating something I’ve created the same a dozen times I still like having
   the ability to edit the post type and taxonomies through this plugin. The same
   reason that I hate hard coding my fieldsets in ACF. Hard coding it and separating
   it from CPTUI means that I’d have to mess with the code to make any changes, 
   and take a chance of screwing it up.
 * But with this knowledge I could code a JSON string into a plugin to be used as
   part of activation, read the options stored by your plugin and insert the post
   types and taxonomies directly into the option for your plugin and have them available
   for editing just like I want when it changes.
 * Insert them on activate and remove them on deactivate. A little work but easily
   automated.
 * With this method I can both hard code them && be able to modify them if I need
   to. Then I just need to update the plugin with the new export.
 * This is actually better than the export/import I was looking for because I can
   completely automate the process. I could even rewrite the JSON file when a plugin
   is deactivated to make sure the correct values are reinserted when it’s activated
   again.
 * Very Cool! Appreciation for taking the time to show me this.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4518020)
 * Sounds like you may be doing what our import/export will do, but taking it in
   your own direction, which is cool.
 * Basically the CPTUI options save as a serialized array. What our future import/
   export page will do is fetch the option, which gets unserialized, and then displays
   in the “export” area as basic JSON data. I’ll be doing js to make selecting it
   select it all to make sure we don’t accidentally copy/paste partial stuff. On
   import, the JSON gets decoded back into an array and saved to the same option
   in the new site.
 * If you wish to do similar things on your own, more power to you. This whole import/
   export part was a 3rd party contribution who will be getting credit in the readme
   and whatnot. We’re not ditching the “Get code” idea, but it is getting a code
   makeover. That way, people can still keep their post types/taxes and ditch our
   plugin if they so desire.

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

The topic ‘Export/Import’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/exportimport-4/#post-4518020)
 * Status: resolved