Example Sync Request
stats function after authentication. The sync request passes data from Dashboard to child sites, including settings like Abandoned Plugins/Themes tolerance (&numberdaysOutdatePluginTheme=365).
Some MainWP settings require syncing after changes because the sync request sets values on child sites.
Add-on Data in Sync Requests
MainWP provides themainwp-sync-others-data hook for add-ons to include data in sync requests. The othersData parameter contains encoded data for plugins like BackWPup, BackupWordPress, BackupBuddy, Client Reports, WP Staging, WP Time Capsule, UpdraftPlus, Page Speed, and WP Rocket.
What the Sync Process Retrieves
The sync request executesget_site_stats() in the MainWP Child plugin (via &function=stats). This function fetches information from child sites and passes it to your Dashboard:
- Available updates for plugins, themes, and WordPress core
- Potentially abandoned plugins/themes
- Site health data
- Add-on-specific data
Performance Considerations
Synchronizing with child sites requires CPU resources, so you may see a brief spike in CPU usage on your Dashboard server. If sync operations cause availability issues for other sites on the same server:- Increase server resources
- Decrease Maximum simultaneous sync requests at MainWP menu (three lines, top right) > MainWP Settings > Advanced Settings (
/wp-admin/admin.php?page=SettingsAdvanced) (increases sync time but reduces CPU load)
Sync Request Security
With the default OpenSSL connection method, MainWP Dashboard generates a 2048-bit RSA public/private key pair for each child site usingopenssl_pkey_new(). The public key is stored on the child site, and MainWP Dashboard stores the private key. New connections have their private keys encrypted automatically. For connections created before version 5.3, complete the private-key encryption steps if you have not already done so.
OpenSSL signs requests using SHA-256 by default. PHPSecLib is an alternative you select in the global or per-site connection settings.
MainWP Dashboard signs each request with the site’s private key. MainWP Child verifies the signature using the corresponding public key. Requests with invalid signatures are rejected.
