Change Post Status is a WordPress ability from Premium Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Change Post Status
WriteChange the status of a page, post or Elementor template (e.g. draft to publish).
Requires the Premium Addons for Elementor plugin on WordPress 7.0+ for the Abilities API (abilities are registered only when the wp_register_ability() function exists). Dashboard, settings and site-inventory abilities (get-id-by-title, list-pages, list-templates, get-global-settings, get-settings, update-setting, scan-usage, disable-unused-widgets, clear-dynamic-assets, subscribe-newsletter) require the caller hold the 'manage_options' capability. premium-addons/create-page requires 'edit_pages'. premium-addons/get-widget-schema, premium-addons/get-addon-schema, premium-addons/list-available-elements, premium-addons/list-pa-addons, premium-addons/detect-atomic-support, premium-addons/check-elementor-element and premium-addons/create-elementor-template require 'edit_posts'. premium-addons/get-page-structure, premium-addons/get-element-settings, premium-addons/add-flexbox, premium-addons/add-container, premium-addons/update-element-settings, premium-addons/insert-widget, premium-addons/remove-element, premium-addons/change-post-status and premium-addons/duplicate-post require 'edit_post' on the target post_id, and deny requests for a nonexistent post_id outright.
What it does
This ability changes the status of a WordPress page, post or elementor_library template. It accepts the post_id and the target status (publish, draft, pending, or private), updates the post via wp_update_post, and returns the previous and new status along with the resulting view URL (permalink when published, preview URL otherwise). It is not destructive because no content is deleted; it is idempotent because setting the same status twice is effectively a no-op. Requests for a nonexistent post_id fail with a clear error.
See it in action
You ask your AI assistant
"Publish the draft page titled 'Coming Soon'."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| post_id | integer | Yes | The ID of the page, post or template to update. |
| status | string | Yes | The new post status: publish, draft, pending, or private. |
Returns
An object with post_id, title, previous_status, new_status, and view_url (the permalink when published, otherwise the preview URL).
Permission
The current user must have the 'edit_post' capability for the target post_id, checked via Helpers::can_edit_input_post(); requests for a nonexistent post_id are denied outright.
More Premium Addons for Elementor abilities
Add Container (Elementor v3)
Add a new Elementor v3 (classic) container to a page, with layout, background, border and spacing already set.
Add Flexbox (Elementor v4 atomic)
Add a new Elementor v4 atomic flexbox container to a page, with layout, background, border and spacing already set.
Check Copy Compatibility
Check whether this site can render elements copied from another site via a transfer URL, before actually importing them.
Check Elementor Element
Check whether a specific element or widget type is registered on the site before trying to build with it.
Clear Premium Addons Dynamic Assets
Clear generated dynamic CSS/JS asset files and purge the related caches.
Create Elementor Page
Create a new WordPress page or post with Elementor enabled, ready to edit.