MLP 2 to MLP 5 Migration Tool
Unified tool to export sites and posts relationships from MLP 2 and import to MLP 5
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/femiyb/mlp2-5/archive/refs/heads/master.zipA WordPress plugin that facilitates the migration of site relationships and content relationships from MultilingualPress version 2 to MultilingualPress version 5.
🚀 Features
- ✅ Automatic Version Detection - Detects whether MLP 2 or MLP 5 is active
- 📤 Export Functionality - Exports all site and content relationships from MLP 2 to JSON
- 📥 Import Functionality - Imports relationships into MLP 5 using its modern API
- 🔓 Legacy Compatibility Bypass - Automatically bypasses MLP 5's legacy version check
- 🧹 Automatic Cleanup - Removes legacy database options after successful migration
- 🌐 Network Admin Integration - Accessible from WordPress Network Admin dashboard
📋 Requirements
- WordPress Multisite installation
- Network admin access
- MLP 2 or MLP 5 installed (but not both simultaneously during normal operation)
- PHP 8.0+ (for MLP 5 compatibility)
📦 Installation
- Download the plugin file (
mlp2-5) - Upload it to your WordPress plugins directory:
/wp-content/plugins/mlp2-5/ - Network activate the plugin from Network Admin → Plugins
🔧 Usage
Step 1: Export from MLP 2
- Ensure MLP 2 is active on your WordPress network
- Do not activate MLP 5 at this point
- Navigate to Network Admin → MLP Migration
- Click "Export Relationships" to download a JSON file containing:
- All site relationships from the
mlp_site_relationstable - All content relationships (posts, terms) from the
multilingual_linkedtable
- All site relationships from the
- Save the downloaded JSON file (named
mlp-migration-YYYY-MM-DD-HHMMSS.json)
Step 2: Switch to MLP 5
- Deactivate MLP 2 from Network Admin → Plugins
- Activate MLP 5 from Network Admin → Plugins
- The migration tool automatically bypasses MLP 5's legacy version check
- You'll see a warning notice prompting you to complete the migration
Step 3: Import to MLP 5
- Return to Network Admin → MLP Migration
- Click "Choose File" and select the JSON file you exported in Step 1
- Click "Import Relationships"
- The tool will:
- Create all site relationships using MLP 5's
SiteRelationsAPI - Create all content relationships using MLP 5's
ContentRelationsAPI - Automatically delete the legacy
inpsyde_multilingualdatabase option
- Create all site relationships using MLP 5's
- You'll see a success message showing the number of relationships created
Step 4: Verify and Clean Up
- Verify that all your site relationships are intact in Network Admin → Sites → MultilingualPress
- Check that content relationships are preserved by viewing translated posts
- Once verified, you can deactivate the migration tool
📊 What Gets Migrated
Site Relationships
- Connections between sites in your WordPress network
- Stored in MLP 2's
mlp_site_relationstable
Content Relationships
- Post-to-post translations across sites
- Term-to-term translations (categories, tags)
- Stored in MLP 2's
multilingual_linkedtable
🔄 Data Structure Conversion
The tool handles the conversion between MLP 2's flat pairwise relationship structure and MLP 5's relationship ID-based system:
- MLP 2: Stores relationships as pairs (Site A ↔ Site B, Post 1 ↔ Post 2)
- MLP 5: Groups related content under a single relationship ID
🐛 Troubleshooting
"Neither MLP 2 nor MLP 5 is detected"
- Ensure one of the MLP plugins is network-activated
- The migration tool detects versions after the
plugins_loadedhook
"Failed to parse JSON"
- Re-export the file from MLP 2
- Ensure the file wasn't modified or corrupted during download
- Check that the file is valid JSON
"MLP 5 services are not available"
- Ensure MLP 5 is properly activated
- Try deactivating and reactivating MLP 5
- Check for PHP errors in your error log
Import shows 0 relationships created
- Verify the JSON file contains data (open it in a text editor)
- Check that the site IDs in the export still exist in your network
- Ensure content IDs (posts, terms) haven't been deleted
📚 Support
For issues related to:
- MLP 2: Refer to the legacy MultilingualPress 2 documentation
- MLP 5: Visit MultilingualPress documentation
- Migration Tool: Check the plugin code for inline documentation
⚠️ Important Notes
- The migration tool is designed for one-time use during the MLP 2 to MLP 5 upgrade process
- After successful migration, you can safely deactivate and delete the plugin
- The tool does not migrate:
- Language settings (these need to be reconfigured in MLP 5)
- Module-specific settings (WooCommerce, ACF, etc.)
- Custom flags or language names
- Always backup your database before performing the migration