Skip to content

Migrate from TranslatePress to WP Provider Translate

To migrate from TranslatePress, you install WP Provider Translate next to it and run two WP-CLI commands: one that imports TranslatePress’s translations while it still runs, and one that takes over once you’ve deactivated it. Your translations, translated page addresses, languages and the language switchers in your menus come along. Imported translations are kept on your site and don’t use your plan.

What comes over from TranslatePress

  • Your translations. Every page is read twice, as visitors see it: once in your site language and once in each translated language. The texts are paired one by one, including image descriptions and other attribute texts. Only texts that TranslatePress actually translated are imported; a text that is the same in both is translated later.
  • Translated addresses. If a page has its own address in a language, WP Provider Translate finds it in the page’s language links (hreflang) and keeps it as that page’s translated slug.
  • Languages. TranslatePress’s default language becomes your site language, and its other languages are added to the languages you translate into, with the same codes in the address (/de/).
  • Language switchers in menus. Each menu that had a TranslatePress switcher gets a WP Provider Translate Languages item in its place. See language switcher in the menu.
  • Shortcodes and block in your content. Once TranslatePress is off, WP Provider Translate handles them, so you don’t have to edit your pages:
    • [language-switcher] and TranslatePress’s language switcher block show WP Provider Translate’s switcher.
    • [trp_language language="…"] and [language-include language="…"] show their content only in the languages listed.
    • [language-exclude language="…"] hides its content in the languages listed.

Imported translations show as Imported on the Translations screen. Like your own corrections, they are not replaced by machine translation. 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 with TranslatePress still active. Follow install and connect. You don’t need to choose languages yet: the finish step takes them over from TranslatePress.
  • Keep TranslatePress active for the import. The import reads the pages TranslatePress serves, so it only works while TranslatePress runs.

Steps

  1. Do a dry run. Run:

    wp wpprovider-translate translatepress-import

    Nothing changes. You see the languages, which pages were read (30 per run), and per language how many translated texts were found and how many could not be paired.

  2. Import, batch by batch. Run:

    wp wpprovider-translate translatepress-import --apply

    The import reads 30 pages at a time: your home page and every published post and page. While there are more, it ends with a line such as Next batch: --offset=30. Run the command again with that offset:

    wp wpprovider-translate translatepress-import --apply --offset=30

    Repeat until it says Imported. Deactivate TranslatePress, then run: wp wpprovider-translate translatepress-finish.

  3. Deactivate TranslatePress under Plugins. Both plugins would otherwise serve the same language addresses.

  4. Finish. Run:

    wp wpprovider-translate translatepress-finish

    This takes over TranslatePress’s languages, replaces its switchers in your menus, and lists the shortcodes and blocks in your content that keep working. Then WP Provider Translate translates, page by page, the texts TranslatePress had not translated.

  5. Check your site. Open a few pages in each language and use the language switcher. WP Provider Translate → Pages shows each page’s state per language. See how translation runs for what happens next.

Good to know

  • TranslatePress’s data stays. The finish step doesn’t remove anything TranslatePress stored.
  • Keep TranslatePress’s settings while you use its shortcodes. Its shortcodes and block keep working as long as TranslatePress’s settings are still on the site; deactivating keeps them. If you delete TranslatePress together with its data, replace the shortcodes and block first: see language switcher options and images and content per language.
  • One translation for the whole site, exceptions per page. If the same sentence was translated differently on different pages, the version used most becomes the site-wide translation; a page that used another keeps its own.
  • Batch size. --limit=<n> sets how many pages one run reads (30 by default).
  • Theme, menu and page builder texts come along too, because each page is read as visitors see it.

Troubleshooting

  • “TranslatePress is not active”. The import reads the pages TranslatePress serves. Activate it, run the import, then deactivate it before the finish step.
  • “No TranslatePress settings on this site.” The command found no TranslatePress settings. Run it on the site where TranslatePress was used.
  • “Could not read …”. That address did not load for a logged-out visitor (for example an error page or a page behind a login). Open it in a private browser window to check, then run that batch again.
  • “Deactivate TranslatePress first”. The finish step only runs with TranslatePress off.
  • A text is in your site language after switching. It was not paired during the import. WP Provider Translate translates it; you can also correct it yourself.
For developers
  • wp wpprovider-translate translatepress-import [--apply] [--offset=<n>] [--limit=<n>]: the import in batches; without --apply a dry run.
  • wp wpprovider-translate translatepress-finish: with TranslatePress deactivated, takes over its languages and replaces its menu switchers.
  • All commands: WP-CLI reference.