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.

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 1 year, 6 months ago.

Assisted by: Minesh.

Author Posts
October 6, 2023 at 9:33 am #14526037

Andrea

hello - after many attempts of posts migration using WP All Import/Export (from a WooCommerce/Polylang site to a NON-WooCommerce/WPML site), I finally succeed to get all the posts in place of the main language and relative tranlsated posts, also following your tutorials on this.
However the posts results NOT linked to each other, so I have to manually link those - meaning that it looks like that I have to open each single post and proceed to assign the relative translation.
I wonder if there is a way to proceed programmatically via PHP, maybe using the WPML id data available...
Any suggestion is more than welcome

October 6, 2023 at 3:49 pm #14530151

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the WPML support.

I'm not sure why you are using WP All Import plugin as we have dedicated plugin to migrate from Polylang to WPML.

What if you try to follow the steps given with the following Doc and check if that help you to resolve your issue.
- https://wpml.org/documentation/related-projects/migrate-polylang-wpml/

If above information is known to you, is there any specific reason that you are using WP ALL Import plugin?

October 7, 2023 at 2:52 pm #14533005

Andrea

Hello Minesh - actually I've first used the "Migrate from Polylang to WPML" plugin to migrate from Polylang to WPML (following the Migrate to Polylang doc).
Then - since it was an WooCommerce installation that required to be migrate to a new "NON-Woocommerce" site, as I mentioned), I've used my WP All Import plugin together with WPML All Import add-on to migrate the whole old database to a fresh new database (as this was the request by our client).
The operation succeed except for the posts languages synchronization...

October 9, 2023 at 12:48 pm #14539707

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As per the doc:
- https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/#importing-content-in-multiple-languages

You want to import the content in multiple languages:
- You will have to add the Unique Identified column to both the language files.
=> https://wpml.org/documentation/related-projects/wpml-all-import-plugin-website-import-with-wpml/importing-multiple-languages-with-wp-all-import-and-wpml/#add-a-unique-identifier-to-your-spreadsheets

Can you please try to follow the steps and check if that help you to resolve your issue.

October 9, 2023 at 1:35 pm #14540227

Andrea

I already followed all the guides you have gently mentioned in your reply (and I did it many time, before to finally succeed on posts migration/import); but the posts synchronization didn't work. Now I need to move on as I got a deadline to meet.
So, backing to the original question: is there a way to proceed programmatically via PHP?

October 9, 2023 at 2:09 pm #14540401

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok great.

Here is the WPML Hooks API doc but there is no good option to set language information using hook:
- https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Can you please try the following troubleshooting steps and check if that help you to resolve your issue.

Before running any steps that are mentioned below, Please create a backup of your website. (Database+website). .

1) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)

2) On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.

- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables

You can check more information for every cleanup option with the following Doc:
- https://wpml.org/documentation/support/wpml-troubleshooting-options/

Does that helps? if no:

Then I will require language files you used to import posts using WP ALL Import plugin to check whats going wrong with your step as well as admin access details to your staging site.

For further investigation, I will require access details (wp-admin and FTP) to your site. Preferably to a test/staging site where the problem has been replicated if possible.

Before sharing access details:
***We always recommend to take full backup of your site (Files and Databse)***

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you enter is private which means only you and I have access to it. Here is a screenshot of private reply where you should fill the private fields:
- hidden link

Please check the following link for details on privacy and security:
- https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/