How to Create Export/Import Functionality for Plugin

There are two basic approaches you can take.

  1. Use the standard wordpress inport / export plugin manually through the admin. Your custom post type must have the property can_export = true (default = true) If you go this route, there are interesting options for adding extra functionality for users, Check out this tutorial on adding export filters specific to a custom post type
  2. Use a custom export / import method you script yourself. For an example of how this might be done, see the Export to Text plugin. Just download it and read the code. For the import side, you would then examine their suggested import plugin, CSV Importer

Leave a Comment