Skip to main content
MainWP Database Updater 5.2.0 registers three abilities in the 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_json examples 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_plugins Dashboard right, and access to the target site
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password. Team Control permissions also apply. Every call checks access to the extension, the 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:
All calls require 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:
  1. woocommerce/woocommerce.php
  2. elementor/elementor.php
  3. elementor-pro/elementor-pro.php
A selection in a different order returns 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.
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.
If the stored observation changes at any step, for example after a sync, the next call returns mainwp_database_updater_observation_conflict. Start again from the first step.

Read Stored Observations

Ability: mainwp/get-site-database-update-observations-v1
Method: GET
Example response:
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-v1
Method: GET
Example response:
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-v1
Method: POST
Database updates change the site’s database and cannot be undone through MainWP. The extension does not check for a backup. Back up the site before dispatching.
Any other combination of dry_run and confirm returns mainwp_database_updater_invalid_input. Run a dry run first:
A dry run returns status: "preview", dispatch_result: "not_attempted", and would_dispatch for each plugin. Then send the update with dry_run: false and confirm: true:
Example response:
Before sending, MainWP Dashboard repeats the permission, observation, and plan checks.

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_ref is for correlation only. A new request_ref does not allow a resend.
  • When a plugin reports a newer target database version, you can dispatch it independently.
A daily scheduled task removes settled receipts after 30 days. Unconfirmed receipts do not expire automatically. After an 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: