Skip to main content

Programmatic Methods for WP Staging Addon

The following developer methods would be highly beneficial for automating staging site management.

  1. Synchronous Staging Site Creation:

    A method to programmatically create a staging site and wait for the process to complete, returning the new site's URL and ID.

    • Proposed Method: $mainwp_staging->create_staging_site_sync($site_id, $options);

    • Expected Return: array('success' => true, 'staging_url' => '...', 'staging_id' => 123)

  2. Staging Process Status Check:

    A method to check the status of an ongoing staging process, including its current state and progress.

    • Proposed Method: $mainwp_staging->get_staging_process_status($staging_id);

    • Expected Return: array('status' => 'running|completed|failed', 'progress' => ...)

  3. Staging Site Cleanup:

    A method to delete a staging site without affecting the production site’s MainWP connection.

    • Proposed Method: $mainwp_staging->cleanup_staging_site($staging_id);

    • Expected Return: array('success' => true)

Thanks for your consideration.

Log in to comment and vote

No comments yet

Be the first to share your thoughts.