Skip to content

Migrate from WPML to WP Provider Translate

To migrate from WPML, you install WP Provider Translate next to it and run three WP-CLI commands: one that shows what will come over, one that imports it, and one that tidies up afterwards. Your languages, which page exists in which language, translated page addresses, language domains and the translations WPML already has are brought over. Your existing translations are kept and don’t use your plan, and WPML’s own data stays untouched until you decide to finish.

What comes over from WPML

  • Languages. WPML’s default language becomes your site language, and its other active languages become the languages you translate into.
  • Which page exists in which language. A page WPML had only in some languages stays available only in those. A page written in another language than your default (an original WPML had in, say, German only) is marked as written in that language. See images and content per language for how this works afterwards.
  • Recent posts in every language. Posts from the last 12 months that WPML had in only some languages become available in every language and are translated, so visitors find your recent posts in their language. Older posts stay in the languages WPML had.
  • Translated addresses. If a WPML translation had its own slug (/de/ueber-uns/ instead of /de/about-us/), that slug is kept.
  • Domains per language. If WPML used a different domain per language, those domains are set up, and each one is used once WP Provider Translate has checked that it reaches your site. See a domain per language.
  • Your translations. The title, excerpt, SEO title and meta description (Yoast SEO and Rank Math) and the text of each translated page. WPML’s string translations (theme, plugin and widget texts) come along too.
  • Pages stay live. A page that visitors could read in a language under WPML stays available in that language right after the import, with WPML’s text.

How your translations are matched

WPML keeps each translation as a whole second page. WP Provider Translate translates text by text, so the import pairs each original text with its WPML translation. It only pairs texts when it is certain:

  • Same structure. When the original and the translation have the same paragraphs in the same order, everything pairs.
  • Strict checks. A pair must keep the same formatting and links, the same numbers and a plausible length. Nothing is guessed.
  • Help from the translation service. When your site is connected, texts the page structure could not pair (for example when the WPML translation has an extra paragraph) are matched by the translation service. Every match must still pass the same checks.
  • One translation for the whole site, exceptions per page. WPML can have different translations of the same sentence on different pages. The one used most becomes the site-wide translation; a page that used another keeps its own.
  • Copies are not translations. If a WPML “translation” was an untranslated copy of the original, it is not imported. That text is translated instead.

Imported translations show as Imported on the Translations screen. Like your own corrections, they are not replaced by machine translation. Anything that did not pair shows in your site language at first and is then translated page by page. See correct and review translations.

Before you start

  • Make a backup of your site, as before any bigger change.
  • WP-CLI. The switch runs with WP-CLI commands. Most hosts offer it over SSH; ask yours if you’re not sure.
  • Install and connect WP Provider Translate. Follow install and connect. Connecting first lets the translation service match more of your texts. You don’t need to choose languages: the import takes them over from WPML.
  • Check your languages are supported. WP Provider Translate supports 37 languages. If WPML has a language that isn’t one of them, the report names it and the import stops without changing anything.

Steps

  1. See what will come over. Run:

    wp wpprovider-translate wpml-report

    It shows WPML’s default and active languages, the address format, how many pages exist per language, which pages are missing in a language, and how many string translations there are. It changes nothing, and works whether WPML is active or not.

  2. Deactivate WPML under Plugins. Both plugins would otherwise try to handle the language addresses. Don’t delete WPML yet: its data stays in your database and the import reads it from there.

  3. Do a dry run. Run:

    wp wpprovider-translate wpml-import

    Without --apply nothing changes. You see the languages, domains, how many translated addresses and pages were found, and per language how many texts paired and how many were left for translation. If it says matching is still running, run the same command again in a few minutes; the answers are kept, so nothing is asked twice.

  4. Import. Run:

    wp wpprovider-translate wpml-import --apply

    It ends with Imported. Check the site, then run: wp wpprovider-translate wpml-finish.

  5. Check your site. Open a few pages in each language, use the language switcher, and look at WP Provider Translate → Pages to see each page’s state per language. Add the switcher where you want it: see language switcher in the menu.

  6. Finish. When you’re happy, run:

    wp wpprovider-translate wpml-finish

    WPML kept each translation as a separate page. Your site no longer needs them, so this moves them to the trash. If your site empties the trash sooner than every 30 days, they are set to draft instead, so they can’t disappear before you notice. Your original pages are not touched.

  7. When everything works, you can delete WPML.

Good to know

  • WPML’s data is never changed by the import. Until you run the finish step, you can go back by deactivating WP Provider Translate and activating WPML again.
  • Undoing the finish step. Restore the translation pages from the trash (or publish the drafts) and activate WPML again. Deleting WP Provider Translate also puts them back.
  • Running the import again brings WPML’s texts over again. An imported text you corrected in the meantime gets WPML’s version back, so make corrections after your final import.
  • Language addresses. Languages get their own folder, such as /de/, or their own domain if WPML used one. Brazilian Portuguese keeps /pt-br/. See multilingual SEO for hreflang and sitemaps.
  • More or fewer recent posts. Use --recent=24 to make posts of the last 24 months available in every language, or --recent=0 to keep every post in the languages WPML had.

Troubleshooting

  • “No WPML data on this site.” The commands found no WPML settings or translation table. Run them on the site where WPML was used.
  • “WPML is active. Deactivate it before switching.” Deactivate WPML under Plugins and run the import again.
  • “Not supported by this plugin: …” WPML has a language that WP Provider Translate doesn’t support. Remove it in WPML, or tell us through WP Provider Translate → Report a problem.
  • “Matching is still running”. The import waits up to four minutes for the translation service. Run the command again a few minutes later to use the result.
  • “Matched by the translation service: 0 (not connected)”. Connect the site first, then run the import again to have more texts matched.
  • “Deactivate WPML first” when finishing. The finish step only runs with WPML off, because WPML can delete other language versions along with a trashed page.
  • “Nothing to finish: run the import first.” Run wpml-import --apply before wpml-finish.
For developers
  • wp wpprovider-translate wpml-report: what a WPML site would bring over. Read only.
  • wp wpprovider-translate wpml-import [--apply] [--recent=<months>]: the import; without --apply a dry run. --recent defaults to 12.
  • wp wpprovider-translate wpml-finish: with WPML deactivated, moves WPML’s translation posts to the trash (or to draft).
  • All commands: WP-CLI reference.