Wp-cli Commands
If you need WP-CLI specific help or installation instructions, please check the WP-CLI website http://wp-cli.org
All commands are lowercase
Dashboard Commands
List all Child sites currently connected to your MainWP Dashboardwp mainwp sitesSync all your MainWP Child sites with your MainWP Dashboard
wp mainwp sync --allSync only specific MainWP Child sites with your MainWP Dashboard use the site ID (e.g., site id 2 & 5)
wp mainwp sync 2,5
You can find your Child site ID's using the
wp mainwp sites command and checking the id field
Plugin Commands
List all your plugins from all your Child sites that need an updatewp mainwp plugin --listUpgrade all plugins that currently need an upgrade on your MainWP Dashboard
wp mainwp plugin --upgrade-allTo only upgrade specific plugins, you can use the upgrade command like:
wp mainwp plugin --upgrade=mainwpchild,akismetIf you only want to upgrade plugins on certain Child sites, you can use (e.g., site id 2 & 5)
wp mainwp plugin 2,5 --upgrade
You can find your Child site ID's using the
wp mainwp sites command and checking the id field
Theme Commands
List all your themes from all your Child sites that need an updatewp mainwp theme --listUpgrade all themes that currently need an upgrade on your MainWP Dashboard
wp mainwp theme --upgrade-allTo only upgrade specific themes you can use the upgrade command like:
wp mainwp theme --upgrade=twentyfifteen,twentythirteenIf you only want to upgrade themes on certain Child sites, you can use (e.g., site id 2 & 5)
wp mainwp theme 2,5 --upgrade
You can find your Child site ID's using the
wp mainwp sites command and checking the id field
Help Commands
If you need help, you can use the following commandswp help mainwp
wp help mainwp sync
wp help mainwp sites
wp help mainwp plugin
Extensions
Sucuri
To trigger a scan for a certain child site, use the following command:wp mainwp-sucuri scan []where [] is the ID of the child site that you want to scan.
Source Article:
https://kb.mainwp.com/docs/wp-cli-commands/