WordPress MultisiteNetwork, compared with the ordinary WordPress site, multi-site network contains interrelated sub-site database, shared media library and complex user rights system, any operational errors may lead to permanent data loss. Now based on actual cases, systematic combing of multi-sitemigrationKey risk points in the process and response options.
![Image[1]- Complete Guide to WordPress Multisite Migration: Secure Transfer and Zero Data Loss Programs](http://gqxi.cn/wp-content/uploads/2025/05/20250516105627629-migrate-website.jpg)
Specificity of the database structure
multisite networkcomprehensive databaseContains several special data tables. Among themwp_blogs
Record basic information for all sub-sites.wp_site
respond in singingwp_sitemeta
store network-level settings, and each sub-site has a separate data table group (e.g., thewp_2_posts
). Testing revealed that direct replication of a single-site database resulted in broken sub-site associations.
In practice, the SQL file containing all prefixed data tables must be exported in its entirety. Use thephpMyAdminTo export, you need to check the "Custom" format and select the "Full Insert" option to avoid data truncation.
![Image [2]- Complete Guide to WordPress Multisite Migration: Secure Transfer and Zero Data Loss Solution](http://gqxi.cn/wp-content/uploads/2025/05/20250516104124390-image.png)
Command line export is more reliable:
bash
mysqldump -u username -p database name > multisite_backup.sql
Media File Handling Essentials
The multisite network defaults to a shared upload directory structure, with media files from all subsites stored in the/wp-content/uploads/sites/
within the subfolder. A common error is to migrate only the main site files, resulting in broken images in the sub-sites.
The reliable solution is to synchronize the entire upload directory using the rsync command:
bash
rsync -avz /old server path /wp-content/uploads/ new server:/wp-content/uploads/
simultaneous check.htaccess
file permissions to prevent403 Denial of AccessError.
Domain name and path configuration
multisite networkwp-config.php
incorporateDOMAIN_CURRENT_SITE
definitions, while the databasewp_options
table (primary site) andwp_#_options
The table (sub-site) stores the absolute URL path. When migrating to a new domain, there are four steps of adjustments to perform:
- exist
wp-config.php
updateDOMAIN_CURRENT_SITE
(be) worth
![Image [3] - Complete Guide to WordPress Multisite Migration: Secure Transfer and Zero Data Loss Solution](http://gqxi.cn/wp-content/uploads/2025/05/20250516140011227-image.png)
- Bulk replacement of old domains using SQL:
sql
UPDATE wp_options SET option_value = REPLACE(option_value, 'old domain name', 'new domain name');
UPDATE wp_#_options SET option_value = REPLACE(option_value, 'old domain name', 'new domain name');;
- Clear all cached plugin data
- Reset fixed link structure
Synchronization of user rights
Multi-site user data is stored in thewp_users
respond in singingwp_usermeta
table, while sub-site permissions are recorded in thewp_#_capabilities
etc. in the metadata. Tests have shown that directly importing the user table may break role assignments.
Recommendation Process:
- Keep all user IDs intact when exporting
- After migration use "network administrator→subscribers→Redistribution of articles"Functions
- probe
wp_user_roles
Whether the option is a complete migration
Validation and Test Checklist
The following checks must be performed after completing the migration:
- All sub-site home pages load properly
- Can administrators switch between different sub-site backends
- Whether the media library image is displayed in full
- Whether the user logs in with the correct permissions
- Whether the plugin remains active at the subsite
Sub-sites appear404 errorWhen you do, you need to check thewp_#_options
tabulatedsiteurl
respond in singinghome
values and resave the fixed link settings. Database connection problems usually stem fromwp-config.php
hit the nail on the head$table_prefix
Mismatch with the actual database prefix.
![Image [4] - Complete Guide to WordPress Multisite Migration: Secure Transfer and Zero Data Loss Solution](http://gqxi.cn/wp-content/uploads/2025/05/20250516141420899-image.png)
Emergency Recovery Program
Preparing two recovery plans minimizes risk:
- database snapshot: Create database point-in-time recovery markers before migration
- File Backup: Retention of the full
wp-content
Catalog Zip
Practical examples show that when the subsite data is abnormal, separate recoverywp_#_options
table is often more efficient than a full library rollback. Using theWP-CLI(used form a nominal expression)search-replace
command is more secure than manual SQL replacement:
bash
wp search-replace 'old domain' 'new domain' --network --dry-run
The complexity of multi-site migrations stems primarily from data correlation.Understanding Table Structure Relationships,Adoption of incremental operation,Establishment of a complete rollback mechanismThese three elements are effective in controlling risk. For hyperscale networks, it is recommended thatMigration of sub-sites in batches, validate core functionality immediately after each migration to avoid systemic failures.
Link to this article:http://gqxi.cn/en/54713The article is copyrighted and must be reproduced with attribution.
No comments