Advanced Topics
FreshDeep dives into MainWP's advanced capabilities for power users and developers.
Topics
| Topic | Description |
|---|---|
| System Requirements | Server specs, PHP settings, hosting compatibility |
| WP-CLI Integration | Command-line management of MainWP |
| OpenSSL Encryption | How MainWP secures Dashboard↔Child communication |
| Migration | Moving your Dashboard or child sites |
Architecture Deep Dive
Key Concepts
Communication Protocol
MainWP uses a custom HTTP-based protocol with OpenSSL encryption:
- Dashboard generates RSA key pair during activation
- Public key is stored on each child site during connection
- All requests are signed with the Dashboard's private key
- Child verifies signature before executing any action
- Responses are encrypted with the Dashboard's public key
Data Storage
| Data Type | Location | Table Prefix |
|---|---|---|
| Site records | Dashboard DB | mainwp_wp_ |
| Sync data | Dashboard DB | mainwp_wp_sync_ |
| Extension data | Dashboard DB | Extension-specific |
| Child auth | Child site DB | options table |
| Temporary data | Both | WordPress transients |
Cron Jobs
MainWP uses WordPress cron (or system cron) for:
- Site syncing — every 24 hours (configurable)
- Uptime checks — every 5 minutes
- Update checks — every 12 hours
- Report generation — per schedule
- Backup scheduling — per job config
System Cron Recommended
For reliable scheduling, disable WP-Cron and use system cron:
bash
# Add to crontab
*/5 * * * * curl -s https://your-dashboard.com/wp-cron.php > /dev/null 2>&1Then add to wp-config.php:
php
define('DISABLE_WP_CRON', true);