Connection Issues
FreshSite Won't Connect
Checklist
- MainWP Child plugin installed and activated on the child site
- Unique Security ID matches between Dashboard and child (if used)
- OpenSSL enabled on both servers (
php -m | grep openssl) - cURL enabled on Dashboard server (
php -m | grep curl) - No firewall blocking Dashboard → Child HTTP requests
- No WAF rules blocking MainWP POST requests (Cloudflare, Sucuri, Wordfence)
- SSL valid on both Dashboard and child site
Common Causes
| Cause | Symptom | Fix |
|---|---|---|
| Child plugin not active | "MainWP Child not detected" | Activate the plugin on the child site |
| Security ID mismatch | "Unauthorized" | Reset Unique Security ID on both sides |
| Firewall blocking | Timeout errors | Whitelist Dashboard IP in child site firewall |
| Cloudflare WAF | 403 errors | Create WAF rule to allow Dashboard IP |
| .htaccess blocking | 403 or 500 errors | Check for IP-blocking rules in .htaccess |
| Plugin conflict | Connection drops | Deactivate other plugins, test, reactivate one by one |
| Wrong URL | "Site not found" | Verify URL is correct (with or without www, https) |
| Hosting limits | Random disconnects | Upgrade hosting or increase resource limits |
Cloudflare Configuration
If child sites are behind Cloudflare:
Option 1: IP Whitelist (Recommended)
- Get your Dashboard server IP
- Cloudflare → Security → WAF → Tools → IP Access Rules
- Add Dashboard IP with action "Allow"
Option 2: Page Rule
- Cloudflare → Rules → Page Rules
- URL:
*example.com/wp-admin/admin-ajax.php* - Settings: Security Level = Essentially Off, Disable Security
Option 3: Firewall Rule
(http.request.uri.path contains "/wp-admin/admin-ajax.php" and ip.src eq YOUR_DASHBOARD_IP)Action: Allow
Wordfence Configuration
If Wordfence is blocking MainWP:
- Wordfence → Firewall → Manage Firewall
- Whitelisted IPs → Add Dashboard server IP
- Save Changes
Security Plugin Conflicts
| Plugin | Issue | Fix |
|---|---|---|
| Wordfence | Blocks POST requests | Whitelist Dashboard IP |
| iThemes Security | Rate limiting | Whitelist Dashboard IP in Lockout settings |
| All In One WP Security | Firewall blocks | Add Dashboard IP to whitelist |
| Sucuri | WAF blocks | Whitelist in Sucuri dashboard |
| Shield Security | Rate limiting | Add exception for MainWP |
Reconnection Steps
If a previously connected site loses connection:
- Try Sync first — Dashboard → Sites → site → Sync
- If sync fails, try Reconnect — Dashboard → Sites → site → Reconnect
- If reconnect fails, remove and re-add the site
- If re-add fails, check all items in the checklist above
Via API
bash
# Check site connection status
curl -u "admin:xxxx" \
-H "Content-Type: application/json" \
-d '{"input":{"site_id": 123}}' \
"https://your-dashboard.com/wp-json/wp-abilities/v1/abilities/mainwp/get-site-v1/run"
# Reconnect a site
curl -X POST -u "admin:xxxx" \
-H "Content-Type: application/json" \
-d '{"input":{"site_id": 123}}' \
"https://your-dashboard.com/wp-json/wp-abilities/v1/abilities/mainwp/reconnect-site-v1/run"Timeout Issues
| Setting | Where | Recommended |
|---|---|---|
max_execution_time | php.ini on Dashboard | 300 |
default_socket_timeout | php.ini on Dashboard | 300 |
| cURL timeout | MainWP Settings | 300 |
| Proxy timeout | Nginx/Apache on child | 300 |
| Cloudflare timeout | Cloudflare dashboard | 300 (Enterprise only) |
Still Not Working?
- Enable debug logging on both Dashboard and child
- Check
wp-content/debug.logfor error details - Test direct connectivity:bash
# From Dashboard server curl -I https://child-site.com curl -I https://child-site.com/wp-admin/admin-ajax.php - Contact MainWP support with the debug logs