olddashboard.com to newdashboard.com), some hosting platforms or migration tools automatically perform a database-wide search and replace. This can corrupt child site URLs stored in MainWP tables, causing connection failures.
What You’ll Learn
- How to prevent child site URL corruption during domain changes
- How to identify and fix corrupted child site URLs
- Which MainWP tables to protect from search-replace
Prerequisites
- Database access (phpMyAdmin, Adminer, or similar)
- Full database backup completed
- List of all connected child site URLs
Understanding the Risk
MainWP stores child site URLs in thewp_mainwp_wp table. When search-replace tools modify this table, they may:
- Replace parts of child site URLs with your new Dashboard domain
- Break connections to all child sites
- Require manual database corrections
https://clientsite.com gets incorrectly changed to https://clientsite-newdomain.com because the old Dashboard domain appeared as a substring.
Before Changing Your Dashboard Domain
1
Export database backup
Create a complete database backup you can restore if needed.
2
Check migration tool behavior
Ask your hosting provider or check migration plugin settings to see if search-replace runs on all tables.
3
Document child site URLs
Note the exact URLs of all connected child sites for verification after migration.
4
Plan table exclusions
Identify how to exclude MainWP tables from the search-replace process.
Preventing URL Corruption
Method 1: Exclude Tables with WP-CLI
When using WP-CLI for domain changes, exclude MainWP tables:Replace
wp_ with your actual table prefix if different.Method 2: Request Table Exclusion from Host
Contact your hosting provider before migration and request that these tables be excluded from search-replace:wp_mainwp_wpwp_mainwp_wp_sync
Method 3: Manual Domain Change
Change the domain manually by:- Updating
siteurlandhomeinwp_options - Running search-replace only on WordPress core tables
- Leaving MainWP tables untouched
Fixing Corrupted Child Site URLs
If child site URLs were modified incorrectly, you must fix them directly in the database. The MainWP Dashboard interface doesn’t allow URL editing for security reasons.Find Affected Sites
1
Access your database
Open phpMyAdmin, Adminer, or your hosting database manager.
2
Select your Dashboard database
Navigate to the WordPress database for your Dashboard site.
3
Run a search query
Identify sites with incorrect URLs:Replace
wrongdomain.com with the incorrect domain appearing in your URLs.Fix URLs Manually (Few Sites)
For a small number of affected sites:- Open the
wp_mainwp_wptable - Click the row to edit
- Update the
urlcolumn to the correct child site address - Save changes
- Repeat for each affected site
Fix URLs with SQL (Many Sites)
For multiple affected sites, use an UPDATE query:After Fixing URLs
1
Log in to Dashboard
Access your MainWP Dashboard at the new domain.
2
Navigate to Manage Sites
Go to MainWP > Sites > Manage Sites.
3
Sync all sites
Click Sync All to verify connections.
4
Test site access
Use Jump to WP Admin on several sites to confirm access works.
If Sites Still Fail to Connect
Verify:| Check | Action |
|---|---|
| Child site accessible | Visit the child site URL directly in a browser |
| Child plugin active | Confirm MainWP Child plugin is activated on the child site |
| No blocking | Check that firewalls or security plugins aren’t blocking connections |
| Correct URL | Ensure the database URL matches the actual child site address |
Self-Check Checklist
- Full backup created before domain change
- MainWP tables excluded from search-replace (or URLs fixed after)
- Dashboard accessible at new domain
- All child sites show correct URLs in Manage Sites
- Sync successful for all child sites
- Jump to WP Admin works for child sites
Related Resources
- Migrate Dashboard - Server migration guidance
- Move Child Sites - Transfer sites between Dashboards
- Reconnecting Child Sites - Reconnection process