Skip to main content
Operations affecting more than 200 sites are automatically queued for background processing. This prevents timeouts and provides progress monitoring for large operations.

What You’ll Learn

  • Understanding batch thresholds and affected abilities
  • Reading immediate vs. queued response patterns
  • Monitoring batch job status
  • Handling errors in batch operations

Batch Threshold

The default threshold is 200 sites. Operations below this threshold execute synchronously and return results immediately.

Affected Abilities

These abilities support batch queuing:

Update Confirmation and Permissions

In MainWP Dashboard 6.3, preview run-updates-v1 and update-all-v1 with dry_run: true, then submit the reviewed selection with confirm: true. A preview does not queue an update job. See Updates Abilities for confirmation flags and update holds. Queued jobs run under the requesting user’s permissions. MainWP rechecks site access, operation permissions, and applicable update holds before executing updates. If access changes after a job is queued, review its errors and skipped items before retrying. Check individual results even when a job’s status is completed.
Bulk and all-sites selections in per-user mode (mainwp_is_single_user is false) include only sites owned by the requesting WordPress user, including administrators. Team Control permissions can narrow that selection further, but cannot add another user’s sites. Default single-user installations are unchanged.

Response Patterns

Immediate Response (≤200 sites)

Queued Response (>200 sites)

mainwp/get-batch-job-status-v1

Retrieves the current status of a queued batch operation. When queued is true, status_url includes the job ID as input[job_id]. Send an authenticated GET to this URL using your WordPress Application Password. Method: GET (readonly)

Input Parameters

Response

Status Values

Polling Workflow

Use the returned status_url to poll with the same WordPress authentication. It already includes input[job_id].

Job Lifecycle

Error Handling

When a batch job encounters errors, individual failures are recorded while the job continues processing remaining items. Check the errors array in the status response for details:
Jobs with errors complete with status: "completed" if any operations succeeded, or status: "failed" if all operations failed.