Support Log in

44. Migration from WPML, Polylang, and TranslatePress

Developer Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

Lang Forge includes a built-in migration tool at Lang Forge > Tools > Migration in the admin panel.

What Gets Migrated

SourceDataSource storageLang Forge target
WPMLPost language assignmentswp_icl_translations_lf_language postmeta
WPMLTranslation groupswp_icl_translations.tridwp_lf_translations rows
WPMLDefault / active languagesicl_sitepress_settings, wp_icl_languageslf_default_language, lf_active_languages
WPMLString translationswp_icl_strings, wp_icl_string_translationswp_lf_strings
PolylangPost language assignmentslanguage taxonomy relationships_lf_language postmeta
PolylangTranslation groupspost_translations taxonomy descriptionwp_lf_translations rows
PolylangLanguage metadatalanguage taxonomy description / term metalf_default_language, lf_active_languages
TranslatePressLanguage settingstrp_settingslf_default_language, lf_active_languages, lf_hide_default_language
TranslatePressRendered post translationswp_trp_dictionary_{default}_{target} + wp_trp_original_metaNew translated post copies + wp_lf_translations rows
TranslatePressGettext stringswp_trp_gettext_{target}wp_lf_strings

What Is NOT Migrated

  • WPML / Polylang post contentAlready exists in wp_posts and does not need to be moved.
  • Translation jobs/statusesWPML workflow data is not carried over.
  • Translation Management / ATE metadataWPML translator assignments, baskets, review states, Advanced Translation Editor history, and job workflow metadata are not converted into Lang Forge workflow state.
  • Advanced plugin settingsNon-language workflow settings from WPML, Polylang, or TranslatePress are not migrated.
  • Visual-editor historyTranslatePress editor history/status metadata is not converted into Lang Forge workflow statuses.

Running the Migration

Via Admin UI:
  1. Install and activate Lang Forge
  2. Navigate to Lang Forge > Tools > Migration
  3. Lang Forge auto-detects WPML, Polylang, or TranslatePress data in the database
  4. Click “Run Migration”
  5. Review the summary
  6. Deactivate the previous multilingual plugin
  7. Test the frontend
Via WP-CLI: install and activate Lang Forge with wp plugin install langforge --activate, run the browser migration from Lang Forge > Tools > Migration, then verify with wp langforge status and wp langforge flush. Deactivate the previous multilingual plugin only after the migration summary looks correct. Activation seeding: on first activation, Lang Forge seeds lf_default_language and lf_active_languages from a real WPML/SitePress installation when it is active (wpml_default_language and wpml_active_languages), or from stored WPML tables/options when only migration data remains. If Polylang is present, activation reads the language taxonomy and polylang.default_lang instead of falling back to the generic ru/en pair. Polylang re-runs: the Polylang importer treats the actual post_translations mapping as authoritative. It clears existing Lang Forge rows for the Polylang-assigned posts being migrated, then writes one row per real Polylang language relationship. Missing languages in an incomplete Polylang group stay missing; the importer does not fabricate default-language translations.

Post-Migration Checklist

  1. Verify translation groups: Run wp langforge status
  2. Check URL rewriting: Run wp langforge flush
  3. Test the language switcher on frontend
  4. Verify front page: Check is_front_page() for translated pages
  5. Re-enter string translations in Lang Forge > String Translation
  6. Test WooCommerce pages if applicable, including cart, checkout, order emails, and any paid extensions
  7. Check page builders – verify Elementor pages render correctly; verify Divi/Beaver/WPBakery/third-party widgets manually before launch
  8. Verify hreflang tags in page source
  9. Test search in each language
  10. Check the XML sitemap for hreflang annotations
Diagnostic function:
php
function lf_migration_diagnostic() {
    $languages = lf_get_languages();
    $results = [];

    foreach ($languages as $code => $lang) {
        $count = new WP_Query([
            'post_type'      => 'any',
            'meta_key'       => '_lf_language',
            'meta_value'     => $code,
            'posts_per_page' => -1,
            'fields'         => 'ids',
        ]);
        $results[$code] = [
            'name'  => $lang['name'],
            'posts' => $count->found_posts,
        ];
    }

    // Check for posts without language
    $no_lang = new WP_Query([
        'post_type'  => 'any',
        'meta_query' => [
            ['key' => '_lf_language', 'compare' => 'NOT EXISTS'],
        ],
        'posts_per_page' => -1,
        'fields'         => 'ids',
    ]);
    $results['_unassigned'] = [
        'name'  => 'No language assigned',
        'posts' => $no_lang->found_posts,
    ];

    return $results;
}

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs