mainwp-database-updater category. All use the mainwp/ namespace on your MainWP Dashboard.
Use them to check which supported plugins on a child site have a pending database update, preview the work, and then send a confirmed update request to MainWP Child. They support the same plugins as the extension: WooCommerce, Elementor, and Elementor Pro.
What You’ll Learn
- Read the stored database update observation for one site
- Create a revision-bound dispatch preview
- Dispatch confirmed database updates and interpret the acceptance result
- Understand how repeated requests are handled
Prerequisites
- WordPress 6.9 or later on the MainWP Dashboard site
- MainWP Dashboard with Abilities API support; use version 6.2 or later for the
input_jsonexamples below - Database Updater 5.2.0 or later, active on MainWP Dashboard
- An authenticated user permitted by the Dashboard Abilities API, with access to the Database Updater extension, the
update_pluginsDashboard right, and access to the target site
update_plugins right, and access to the requested site. Application Password and session authentication require manage_options. A permitted MainWP REST API key with explicit Team Control site grants can use the scoped-key path without that broad capability.
Available Abilities
Discover the abilities and their schemas:
site_id: a positive integer such as 17, or its decimal string form such as "17". These abilities reject extra input properties.
plugin_files accepts one to three of these values, without duplicates, in this order:
woocommerce/woocommerce.phpelementor/elementor.phpelementor-pro/elementor-pro.php
mainwp_database_updater_invalid_input.
Observations come from the data MainWP Dashboard stored at the last sync. They do not apply the Dashboard’s site or per-plugin ignore settings. Check those settings before you dispatch updates.
Recommended Workflow
1
Read the observation
Call
get-site-database-update-observations-v1 and keep observation_revision.2
Preview the plan
Call
preview-site-database-update-dispatch-v1 with the plugins to update and the observation revision. Keep plan_revision.3
Confirm your backup decision
Create and verify a fresh backup before continuing. The extension does not verify backups.
4
Dispatch
Call
dispatch-site-database-updates-v1 with dry_run: false and confirm: true.5
Sync the site
Sync the site later to confirm the database update completed.
mainwp_database_updater_observation_conflict. Start again from the first step.
Read Stored Observations
Ability:mainwp/get-site-database-update-observations-v1Method: GET
This read does not contact MainWP Child. Sync the site first if you need current data.
Preview a Dispatch
Ability:mainwp/preview-site-database-update-dispatch-v1Method: GET
plan_revision binds the site, the selected plugins, and the observation revision. The preview does not contact MainWP Child, check backups, or reserve the update.
Each selected plugin must appear in the current observation’s plugin_files. Otherwise, the call returns mainwp_database_updater_observation_conflict.
Dispatch Database Updates
Ability:mainwp/dispatch-site-database-updates-v1Method: POST
Any other combination of
dry_run and confirm returns mainwp_database_updater_invalid_input.
Run a dry run first:
status: "preview", dispatch_result: "not_attempted", and would_dispatch for each plugin.
Then send the update with dry_run: false and confirm: true:
Response fields
Each entry in
items has an outcome of would_dispatch, accepted, not_accepted, or unknown.
completion_known is always false. Acceptance means MainWP Child started or queued the update. It does not confirm the plugin finished its database migration. Accepted plugins stay listed as pending until a later sync refreshes the site’s data.
post_observation_status describes how MainWP Dashboard handled the site data returned by MainWP Child:
Repeated requests
MainWP Dashboard records one dispatch receipt for each site, plugin, and target database version. The receipt is shared by Abilities API calls and by Update buttons in the Dashboard.- While its receipt is retained, if an earlier request for the same target was accepted or not accepted, a repeat returns that recorded result. MainWP Child is not contacted again.
- If an earlier request is still in progress or its result is unknown, a repeat returns
status: "outcome_unknown". MainWP does not resend the update, because the site may already have applied or queued it. request_refis for correlation only. A newrequest_refdoes not allow a resend.- When a plugin reports a newer target database version, you can dispatch it independently.
outcome_unknown result, sync the site and check the plugin on the Child site before taking further action. If it is safe to retry, use Clear Stuck Request before sending another dispatch. Changing request_ref alone does not clear the receipt.
Error Handling
Standard authentication, schema, and method errors follow the Abilities API error reference. Database Updater can also return:Related Resources
- Database Updater - Install the extension and update databases from the Dashboard
- Abilities API Overview - Authentication, input formats, discovery, and errors
- Sites Abilities - Find site IDs and sync sites
