What You’ll Learn
- How MainWP secures the initial site connection
- How Dashboard-to-Child communication is encrypted
- How request authentication prevents unauthorized access
Initial Connection Security
MainWP 5.3 introduced enhanced security features for the site connection process.Password Authentication
MainWP uses the WordPress administrator’s password for verification during initial setup. This feature, enabled by default, ensures only verified administrators can authorize connections.Unique Security ID
An optional Unique Security ID adds another layer of authentication during setup. When enabled, this ID must match on both Dashboard and Child Site for the connection to succeed. This feature is valuable for sites requiring stricter access controls.Connection Timeout
The MainWP Child plugin includes a connection timeout to minimize exposure. After activation, if no connection is established within the specified time (in minutes), the plugin automatically deactivates itself. This prevents idle plugins from remaining accessible.Disconnect Site Option
The Disconnect Site feature allows you to clear all connection data for a Child Site directly from the Dashboard. Use this when:- Decommissioning sites
- Re-establishing secure connections
- Troubleshooting setup issues
Post-Connection Security
After a site is added, all communication uses OpenSSL-encrypted connections.Key Pair Generation
When MainWP Dashboard connects to a child site for the first time:- Dashboard generates Public and Private key pairs (2048 bits) using
openssl_pkey_new() - Public key is saved on both the child site and Dashboard
- Private key is encrypted and saved only on the Dashboard
Request Signing and Verification
The child site only processes requests with valid signatures that match its stored public key.
HTTPS Request Structure
MainWP Dashboard communicates with child sites via HTTPS requests using cURL. Each request includes:Example Sync Request
mainwpsignature doesn’t match, the child site rejects the request.
Request Parameter Escaping
Before sending any request to a child site, MainWP Dashboard escapes all parameter values to prevent code injection. For example, the Jump to WP Admin feature escapesname and value attributes using esc_attr():

Why This Matters
This escaping protects against scenarios where an attacker might:- Trick you into clicking a crafted link
- Attempt to pass malicious code through request parameters
Complete Request Flow
The security system works as follows:- Preparation: Dashboard escapes all request attributes
- Transmission: HTTPS request sent with MainWP Signature and parameters
- Verification: Child site validates signature against stored public key
- Execution: Only authenticated requests are processed
Related Resources
- MainWP Security - Security overview
- OpenSSL Key Encryption - Private key encryption
- API Key Storage - Credential encryption
- Two-Factor Authentication - Additional login security