Skip Navigation

[Resolved] Export and import of WordPress content produces unexpected results

This thread is resolved. Here is a description of the problem and solution.

Problem:

Export/import custom posts of WPML translation.

Solution:

According to WPML document:

https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/#importing-posts-from-an-old-wordpress-installation
sectioon "Exporting Posts"

We do not recommend using the standard WordPress option to export content to XML files (Tools → Export). You will have to split those files into many (one for each language) and add an XML element with a Translation Group ID. XML files are not easy to edit, so it can be a lengthy process

I suggest you try to follow WPML documents to export and import your website posts:

Relevant Documentation:

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

https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by simonM-5 2 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2297357
Screenshot 2022-02-19 at 11.23.23.png
Screenshot 2022-02-19 at 11.22.49.png

Hi Support

As we approach the time when we will have a production site that we can no longer simply "overwrite" with our dev site, I wanted to experiment with a "delta-deployment" from our dev subdomain to our test subdomain, instead of migrating our entire site from dev to test with Duplicator Pro.

Here are the steps I followed:
STEP 1) Created a new, simple custom post type "Blog Entries" (just using the standard WordPress fields, no custom fields) and the new custom Taxonomy Blog Categories and created two simple dummy blog entries posts. The custom post type and custom taxonomy is set in WPML to be translatable and I translated all dummy content from EN to DE.

STEP 2) Used the Toolset Export/Import functionality to export the new custom Post Type and taxonomy from dev and import it on test. That seemed to work OK - at least it didn't produce any errors.

STEP 3) Set the custom post type Blog Entries and custom taxonomy in WPML settings in the test subdomain to be translatable (that setting apparently didn't export/import successfully - is that expected behaviour?!)

STEP 4) Manually set the Toolset Access rules on test environment to match dev, to allow only Admins to view the Blog and entry pages.

STEP 5) I then wanted to export and import the "content". So I used the standard WordPress Admin > Settings > Export tool to export the 2 dummy blog entry posts to an XML file. When I run the standard WordPress Admin > Settings > Import process to import the 2 posts on the test domain, I get 4 posts in English with no German translated versions, instead of the 2 english posts with the translated German versions.

(see screenshots)

Questions:
Q1) Is it expected that the imported CPT and Taxonomy on the target site doesn't carry over its WPML translation settings?
Q2) Why are the posts importing differently? What am I missing to get a "perfect" import in the target environment, ie with 2 English posts with their 2 German counterparts?
Q3) Does Toolset have any documentation we should be following for "delta" deployments (ie not duplicating a whole site, just smaller elements of it)? The only relevant documentation I could find was this: https://toolset.com/documentation/legacy-features/export-import/exporting-and-importing-toolset-components-and-settings/
Q4) Are there any plugins or tools that you could recommend for exporting and importing WordPress elements on a more granular level than entire sites?

Thanks and kind regards
Simon

#2298533

Hello,

According to WPML document:
https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/#importing-posts-from-an-old-wordpress-installation
sectioon "Exporting Posts"

We do not recommend using the standard WordPress option to export content to XML files (Tools → Export). You will have to split those files into many (one for each language) and add an XML element with a Translation Group ID. XML files are not easy to edit, so it can be a lengthy process

I suggest you try to follow WPML documents to export and import your website posts:
https://wpml.org/documentation/plugins-compatibility/export-multilingual-websites-using-wp-all-export-wpml/
https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/

#2300891

HI Luo

Thanks for the links. We are experimenting with the WP All Import/Export plugins.

Just to be clear though - is there no other supported way to achieve this using standard Toolset/WPML plugins? It seems a little ridiculous to have to ask customers to buy third party plugins just to migrate translated content programmatically. For example, WPML could/should provide an Export function to include this WPML Translation ID etc...

Kind regards
Simon

#2301579

Q1) is there no other supported way to achieve this using standard Toolset/WPML plugins?
No, there isn't

Q2) WPML could/should provide an Export function to include this WPML Translation ID etc...
No, as the document I mentioned above, WPML does not provide such kind of feature, you can add a feature request to WPML:
https://wpml.org/suggest-a-new-feature-for-wpml/

#2303709

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.