Restore Page is a WordPress ability from Ultimate Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Restore Page

Write

Restores a trashed WordPress page or post back to its previous status.

Requires the Ultimate Addons for Elementor (Header Footer & Elementor) plugin on WordPress 6.9+ (the WP Abilities API). No ability registers unless the plugin's 'Enable AI Tools' master switch (uae_mcp_settings.enable_abilities) is turned on in settings. Most abilities require the 'manage_options' capability; a smaller set of read/discovery abilities (template and page listing, the Elementor builder read/list/schema abilities, active-template lookup, display-rule locations, and design tokens) instead require only 'edit_posts' or 'read'. Abilities that act on a specific page, post, or template additionally check the current user's per-object 'edit_post' (or 'delete_post') capability on that item. Separately, every non-readonly (Write or Destructive) ability is gated behind a site-wide 'Allow Modifications' setting at registration time: if it is off, none of those abilities are even registered with the WP Abilities API, regardless of capability checks — this covers all template/page CRUD, widget/extension toggles, display-rule updates, theme/settings changes, and the Elementor builder writes alike, not just the builder ones. Eight of those abilities (the seven Elementor page-builder writes — build, insert-widget, update-widget, remove-element, move-element, add-section, add-column — plus pages-create) additionally re-check this same setting explicitly inside execute() as a redundant safeguard.

What it does

Loads the target post, rejects it if it's an 'elementor-hf' template, and requires the post to currently be in trash status (400 error otherwise). It performs an explicit current_user_can('edit_post', post_id) check, then calls wp_untrash_post() and re-fetches the post to report the status it was restored to.

See it in action

You ask your AI assistant

"Restore the page I just trashed, post ID 55."

Inputs

Name Type Required Description
post_id integer Yes The trashed page or post ID to restore.

Returns

An object with success, post_id, new_status (the restored status), and a confirmation message naming the post.

Permission

Requires current_user_can('manage_options'); execute() manually verifies the post is not an HFE template and is currently trashed, plus an explicit current_user_can('edit_post', post_id) check. No check_modifications_allowed call is present.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.