What You’ll Learn
- Why staging sync breaks the MainWP connection
- How to exclude the MainWP key from sync operations
- How to reconnect after syncing
Why This Happens
MainWP uses OpenSSL encryption to secure communication between your Dashboard and child sites. When a child site connects to your Dashboard:- The Dashboard generates a unique public key
- This key is stored in the child site’s database as
mainwp_child_pubkey(in thewp_optionstable) - All subsequent communication uses this key for encryption
mainwp_child_pubkey value from one site to the other. This overwrites the correct key, and the connection breaks because the key no longer matches what the Dashboard expects.
Solution 1: Exclude the Key from Sync
The best approach is to configure your staging plugin to exclude the MainWP key from synchronization.WP Staging
Duplicator Pro
WP Migrate
Other Staging Tools
Check your staging tool’s documentation for database field exclusions. The goal is to preventmainwp_child_pubkey from being copied during sync operations.
Solution 2: Reconnect After Sync
If your staging tool doesn’t support exclusions, reconnect the site after each sync:Prevention Tips
- Configure exclusions before your first staging sync
- Document which sites have staging environments
- Consider using separate MainWP Dashboards for staging networks if you manage many staging sites
- Test the exclusion by syncing and verifying the connection remains intact
Self-Check Checklist
- Staging plugin configured to exclude
mainwp_child_pubkey - Test sync completed without breaking connection
- Documentation updated for your staging workflow
Related Resources
- OpenSSL Keys Encryption - How MainWP encryption works
- Reconnecting Child Sites - Reconnection process
- Staging Extension - MainWP’s built-in staging solution