Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Bruno Kos 10 months, 2 weeks ago.

Assisted by: Bruno Kos.

Author Posts
February 23, 2024 at 12:18 pm #15337607

mikeG-21

Hi.

We have about 4000-5000 posts in various languages that we want to migrate to Custom Post Type. The unique thing about those posts is that they are currently regular post type "Post" and are in the category "Example1" or the category "Example2.

The problem is that if I switch the post type of those posts either via the Taxonomy switcher plugin, Post type switcher plugin, or a direct SQL command(which is the fastest), the post translations are not correctly migrated and I get a lot of Orphaned posts. All of the posts also get migrated to the primary EN language.

I also tried following these instructions, but without luck: https://wpml.org/forums/topic/move-posts-and-their-translations-from-posts-category-to-a-custom-post-type/

Can you let me know the best way to migrate posts from category "Example1" and "Example2", to a Custom post type? While maintaining all translations/language data and other metadata.

Thank you. Kind Regards

February 24, 2024 at 8:20 am #15340021

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

What about this approach?

### Step 1: Export Posts

https://wpml.org/documentation/plugins-compatibility/export-multilingual-websites-using-wp-all-export-wpml/

### Step 2: Configure WPML

Check WPML settings to ensure your CPT is translatable (WPML → Settings → Post Types Translation).

### Step 3: Import to CPT

Now, use WP All Import and WPML to import the previously exported posts into the new Custom Post Type.

https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/importing-multiple-languages-with-wp-all-import-and-wpml/

Also, make sure that your taxonomies are created before:
https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/importing-multiple-languages-with-wp-all-import-and-wpml/#step-2-create-your-taxonomies-in-wordpress

Regards,
Bruno Kos

The topic ‘[Closed] How can I migrate Posts to Custom Post Type but keep translations info’ is closed to new replies.