WPML String Translation Index Corrupted After Host Migration and the Reindex + Selective Import That Restored Translated Strings
5 min readIf you’ve recently migrated your WordPress site and noticed that some or many of your translated strings are no longer appearing correctly, you’re not alone. One of the more subtle and frustrating issues WordPress site owners face after moving hosts is a breakdown in multilingual support managed by WPML, especially with the String Translation index. This problem doesn’t manifest as a crash or blank page—it creeps in silently with missing strings or fallback languages overriding properly translated content.
TL;DR
After a host migration, the WPML String Translation index can become corrupted, leading to missing or incorrect translated strings. This issue can often be solved by performing a full reindex of the strings and using a selective import strategy to recover or reassign translations. The WPML plugin has tools for reindexing, and a backup of the original database can be a lifesaver in restoring lost string translations. A systematic step-by-step approach is recommended to prevent permanent loss of multilingual data.
What Exactly is the WPML String Translation Index?
The WPML String Translation module allows you to translate texts outside posts and pages—like theme texts, plugin messages, widget titles, etc. These strings are stored in the database and are indexed for efficient retrieval.
Upon plugin activation and during use, WPML creates and maintains an index of all strings and their translations. This index is essential for the fast loading and accurate display of translated content on the front and back end of your WordPress site.
The Issue: What Happens After a Host Migration?
During a typical host migration, you might experience:
- Incomplete migration of serialized data: WPML stores translation entries using serialized arrays. A change in server configuration or incorrect export can corrupt that data.
- Incorrect database encoding: UTF-8 issues can cause special characters or entire strings to vanish.
- Missing or corrupted indexes: Without tight coupling between the string and its translation, WPML gets confused and shows the default or nothing at all.
Here’s what the symptoms looked like post-migration in our case:
- Translated menu items showing up in the primary language.
- Header and footer widgets with default text only.
- Theme-specific settings failed to switch languages despite being translated previously.
Diagnosing this isn’t always straightforward. Debugging tools won’t necessarily throw errors, and without visible signs of a crash, many assume it’s just a missed configuration.
Step-by-Step: Diagnosing and Fixing the Issue
Once we understood the issue was with the String Translation index, a step-by-step strategy was necessary. Here’s what we did:
1. Backing Up Everything
Before making any changes, we created a full backup of the current site as well as the pre-migration site. This included files and, most importantly, the database. WPML data is stored in tables such as wp_icl_strings and wp_icl_string_translations.
2. Manually Rebuilding the String Translation Index
WPML provides an interface for reindexing in WPML > Support > Troubleshooting. From here, we forced a reindex of the strings:
- Go to WPML > Support > Troubleshooting
- Scroll to “Clean up” operations
- Click “Remove ghost entries from the translation tables”, followed by “Recreate ST database tables”
- Finally, click “Clear the cache in WPML” and reload strings
Once this was done, we saw some of our missing translations come back—but not all. Worse yet, some translations had incorrect associations, such as strings used in headers appearing in footers.
3. Restoring Missing Strings via Selective Import
The next logical solution was to identify and selectively import the affected strings from the original pre-migration database. This required us to:
- Export the
wp_icl_stringsandwp_icl_string_translationsfrom our backup database using phpMyAdmin. - Compare them with the current database using a diff tool (like Beyond Compare or DataCompare).
- Identify the missing or altered string entries based on their string IDs, contexts, and language codes.
- Manually reinsert these into the live site database using SQL INSERT commands.
This approach allowed us to restore dozens of translations that were not recovered during the reindexing phase. The selective import gave us precision without the risk of corrupted matchings due to a full overwrite.
Tips to Prevent Index Corruption During Future Migrations
The issue we faced can be avoided or mitigated with the following tips:
- Use a WordPress-aware migration plugin: Tools like All-in-One WP Migration or WP Migrate handle serialized data properly, including WPML data.
- Always export databases in UTF-8: Improper charset handling can mangle multilingual content.
- Double-check plugin versions: Ensure WPML and its components are the same before and after the move.
- Enable WP_DEBUG during staging: Deactivated plugins might throw silent errors if their index expectations aren’t met.
The Bigger Picture: Why WPML’s Internal Indexing System Matters
The core functionality of WPML hinges on its internal indexing for performance and relevance. It’s not just a storage mechanism—it determines how fast and accurately content is served by language. If this part is broken, you don’t just lose translations; you risk SEO penalties, user confusion, and broken user interfaces.
Consider the functional aspects WPML indexing affects:
- Multilingual SEO effectiveness
- WooCommerce product descriptions and checkout fields
- Site navigation and breadcrumbs
- Theme and plugin language support
In our case, restoring that index meant bringing back trust in the site’s usability across different regions. Missing translations led to higher bounce rates from users assuming “something is broken.”
More importantly, this incident exposed how crucial it is to treat WPML as more than just another plugin during a migration—its data has deeper relational structures than many WordPress components.
Conclusion: Vigilance and Strategy Win the Day
Fixing the WPML String Translation index post migration is not impossible. With a structured reindexing and selective import strategy, you can recover lost translations and restore site integrity. The key takeaway? Always plan for the resilience of complex plugin data structures when migrating hosts.
As WordPress continues growing as a multilingual platform, tools like WPML are indispensable. But like anything powerful, they require care—especially when undergoing something as disruptive as a server migration.
So the next time you prepare a migration, remember: backup, verify, reindex, and if needed—selectively import.