Migrating data from one post type to another

(FoolPress) #1

I have a client with an old calendar system and I’d like to migrate it to a new solution. There are hundreds of calendar entries in a custom post type and fields and am wondering what a good solution is to move data from one to another.

(Leland Fiegel) #2

I’ve used this before: https://wordpress.org/plugins/post-type-switcher/

Simple, supports bulk editing, and works like a charm.

(FoolPress) #3

Thanks for the reply
Looking at the screenshot it doesn’t appear to be able to copy data from one custom field to another

In a calendar for example one plugin may have “start-date” custom field and the other plugin may have “beginning date”


(Leland Fiegel) #4

It looks like you can use an SQL query, like this, to accomplish that.

(Nate Wright) #5

If you’re not used to dipping into the database, an alternative approach that might give you granular control over the content would be to export the old posts and then import them using WP All Import / Export.

(Hesham) #6

There is no simple answer for this question. If I understand well, you want to switch from a plugin to another. If you are not comfort with SQL queries, you may try using some useful tools, I’ve used these in the past to achieve something similar:

Generally you will need to follow this logic:

  1. Backup your site database
  2. Transport plugin settings (usually the best way is to do it manually)
  3. Transport the custom post type (you will need a bulk conversion utility for post types, like Convert Post Types plugin)
  4. Rename custom post meta keys (You can use Custom Field Bulk Editor plugin)

Other resources: You can use Post Meta Inspector plugin to inspect post meta values, this will give you useful insights while transporting post meta fields.

Important! This process can mess up your database, mostly it won’t succeed from the first try, so you must not forget to backup your site database.

I hope this helps.

(FoolPress) #7

Hey thanks for this. I’ll take a look

(Jimmy Smutek) #8

I haven’t posted here in forever but came across this while lurking around and logged in to say I’ll absolutely vouch for this one. It’s helped me through a few difficult times. Well worth a look.

(FoolPress) #9

Thanks so much. It’s a bit out of my price range but I’ll certainly bookmark it if my budget expands.