Skip to main content
When you change your MainWP Dashboard domain (for example, from 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 the wp_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
Example of corruption: A child site URL 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

Create a full backup (files and database) before changing domains.
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:
wp search-replace 'olddomain.com' 'newdomain.com' --skip-tables=wp_mainwp_wp,wp_mainwp_wp_sync
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_wp
  • wp_mainwp_wp_sync

Method 3: Manual Domain Change

Change the domain manually by:
  1. Updating siteurl and home in wp_options
  2. Running search-replace only on WordPress core tables
  3. 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:
SELECT id, name, url
FROM wp_mainwp_wp
WHERE url LIKE '%wrongdomain.com%';
Replace wrongdomain.com with the incorrect domain appearing in your URLs.

Fix URLs Manually (Few Sites)

For a small number of affected sites:
  1. Open the wp_mainwp_wp table
  2. Click the row to edit
  3. Update the url column to the correct child site address
  4. Save changes
  5. Repeat for each affected site

Fix URLs with SQL (Many Sites)

For multiple affected sites, use an UPDATE query:
UPDATE wp_mainwp_wp
SET url = REPLACE(url, 'wrongdomain.com', 'correctdomain.com')
WHERE url LIKE '%wrongdomain.com%';
Test UPDATE queries with SELECT first. Run the SELECT version to verify which rows will change before executing the UPDATE.

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:
CheckAction
Child site accessibleVisit the child site URL directly in a browser
Child plugin activeConfirm MainWP Child plugin is activated on the child site
No blockingCheck that firewalls or security plugins aren’t blocking connections
Correct URLEnsure 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