$instance
$instance : null
Singleton.
Class MainWP_WP_CLI_Handle
Manage all child sites added to the MainWP Dashboard via WP CLI.
map_assoc_args(array $assoc_args, array $fields, array|string $required_fields = 'all') : array
Maps arguments.
array | $assoc_args | Arguments. |
array | $fields | Fields. |
array|string | $required_fields | Fields that are required, default 'all': all fields are required. |
$data Required data.
callback_site_site_info(array $args = array(), array $assoc_args = array(), object $website = false)
Shows child site info.
Command Example: wp mainwp site --site-info [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_installed_plugins(array $args = array(), array $assoc_args = array(), object $website = false)
Lists installed plugins on a child site.
Command Example: wp mainwp site --site-installed-plugins [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_installed_plugins_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of installed plugins on a child site.
Command Example: wp mainwp site --site-installed-plugins-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_active_plugins(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all active plugins on a child site.
Command Example: wp mainwp site --site-active-plugins [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_active_plugins_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns a number of active plugins on a child site.
Command Example: wp mainwp site --site-active-plugins-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_inactive_plugins(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all inactive plugins on a child site.
Command Example: wp mainwp site --site-inactive-plugins [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_inactive_plugins_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of inactive plugins on a child site.
Command Example: wp mainwp site --site-inactive-plugins-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_installed_themes(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all installed themes on a child site.
Command Example: wp mainwp site --site-installed-themes [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_installed_themes_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of installed themes.
Command Example: wp mainwp site --site-installed-themes-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_active_themes(array $args = array(), array $assoc_args = array(), object $website = false)
Shows the active theme on the child site.
Command Example: wp mainwp site --site-active-themes [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_inactive_themes(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all inactive themes on a child site.
Command Example: wp mainwp site --site-inactive-themes [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_inactive_themes_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of inactive themes.
Command Example: wp mainwp site --site-inactive-themes-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_available_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Lists available updates for a child site.
Command Example: wp mainwp site --site-available-updates [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_available_updates_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of available updates for a child site.
Command Example: wp mainwp site --site-available-updates-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_abandoned_plugins(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all abandoned plugins on a child site.
Command Example: wp mainwp site --site-abandoned-plugins [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_abandoned_plugins_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of abaindoned plugins on a child site.
Command Example: wp mainwp site --site-abandoned-plugins-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_abandoned_themes(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all abandoned themes on a child site.
Command Example: wp mainwp site --site-abandoned-themes [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_abandoned_themes_count(array $args = array(), array $assoc_args = array(), object $website = false)
Returns the number of abandoned themes on a child site.
Command Example: wp mainwp site --site-abandoned-themes-count [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_http_status(array $args = array(), array $assoc_args = array(), object $website = false)
Returns child site HTTP status.
Command Example: wp mainwp site --site-http-status [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_health_score(array $args = array(), array $assoc_args = array(), object $website = false)
Returns child site Health score.
Command Example: wp mainwp site --site-health-score [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_security_issues(array $args = array(), array $assoc_args = array(), object $website = false)
Lists child site security issues.
Command Example: wp mainwp site --site-security-issues [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_add_site(array $args = array(), array $assoc_args = array(), object $website = false)
Adds child site.
Command Example: wp mainwp site --add-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_edit_site(array $args = array(), array $assoc_args = array(), object $website = false)
Edits child site.
Command Example: wp mainwp site --edit-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_sync_site(array $args = array(), array $assoc_args = array(), object $website = false)
Syncs child site.
Command Example: wp mainwp site --sync-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_reconnect_site(array $args = array(), array $assoc_args = array(), object $website = false)
Reconnects child site.
Command Example: wp mainwp site --reconnect-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_disconnect_site(array $args = array(), array $assoc_args = array(), object $website = false)
Disconnects child site.
Command Example: wp mainwp site --disconnect-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_remove_site(array $args = array(), array $assoc_args = array(), object $website = false)
Removes child site from the MainWP Dashboard.
Command Example: wp mainwp site --remove-site [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_update_wordpress(array $args = array(), array $assoc_args = array(), object $website = false)
Updates WP Core on a child site.
Command Example: wp mainwp site --site-update-wordpress [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_update_plugins(array $args = array(), array $assoc_args = array(), object $website = false)
Updates all plugins on a child site.
Command Example: wp mainwp site --site-update-plugins [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_update_themes(array $args = array(), array $assoc_args = array(), object $website = false)
Updates all themes on a child site.
Command Example: wp mainwp site --site-update-themes [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_update_translations(array $args = array(), array $assoc_args = array(), object $website = false)
Updates translations on a child site.
Command Example: wp mainwp site --site-update-translations [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_update_item(array $args = array(), array $assoc_args = array(), object $website = false)
Updates single item on a child site.
Command Example: wp mainwp site --site-update-item [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_manage_plugin(array $args = array(), array $assoc_args = array(), object $website = false)
Manages plgins on a child site.
Command Example: wp mainwp site --site-manage-plugin [
Action: activate|deactivate|delete Plugin: plugin slugs separated by ||.
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_site_manage_theme(array $args = array(), array $assoc_args = array(), object $website = false)
Manages themes on a child site.
Command Example: wp mainwp site --site-manage-theme [
action: activate|delete. theme: theme name.
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_site_check_site_http_status(array $args = array(), array $assoc_args = array(), object $website = false)
Checks child site for HTTP Status.
Command Example: wp mainwp site --check-site-http-status [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_ignored_plugins_updates(array $args = array(), array $assoc_args = array(), object|boolean $website = false)
Lists all ignored plugins for a child site.
Command Example: wp mainwp updates --ignored-plugins-updates [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object|boolean | $website | Website object. |
callback_updates_site_ignored_plugins_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all per site ignored plugin updates for a child site.
Command Example: wp mainwp updates --site-ignored-plugins-updates [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_ignored_themes_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all ignored theme updates for a child site.
Command Example: wp mainwp updates --ignored-themes-updates [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_site_ignored_themes_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Lists all per site ignored theme updates for a child site.
Command Example: wp mainwp updates --site-ignored-themes-updates [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_ignore_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Ignores an update globally.
Command Example: wp mainwp updates --ignore-updates --type=[type] --slug=[slug] --name=[name].
type: plugin|theme
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_ignore_update(array $args = array(), array $assoc_args = array(), object $website = false)
Ignores an update on a child site.
Command Example: wp mainwp updates --ignore-update [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_unignore_updates(array $args = array(), array $assoc_args = array(), object $website = false)
Unignores an update.
Command Example: wp mainwp updates --unignore-updates --type=[type] --slug=[slug].
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |
callback_updates_unignore_update(array $args = array(), array $assoc_args = array(), object $website = false)
Unitnores an update on a child site.
Command Example: wp mainwp updates --unignore-update [
array | $args | Arguments. |
array | $assoc_args | Arguments. |
object | $website | Object containing child site data. |