Update post robots settings is a WordPress ability from SEOPress — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Update post robots settings

Destructive
SEOPress SEO seopress/update-post-robots-settings

Update the robots/indexing directives of a post.

Requires the SEOPress plugin on WordPress 6.9+ for the Abilities API — abilities are registered only when wp_register_ability() exists, gated by the plugin's own seopress_abilities_api_available() check. Each per-post ability additionally requires the current user to hold the WordPress 'edit_post' capability for the target post (and the post must exist); the global title settings ability instead requires the SEOPress capability for managing title settings, which defaults to manage_options and is filterable via seopress_capability().

What it does

This ability wraps SEOPress's RobotSettings REST controller (processPut) to update a post's robots/indexing directives from a settings map, such as _seopress_robots_index, _seopress_robots_follow or _seopress_robots_canonical. Only known SEOPress robots meta keys are accepted by the underlying controller; unrecognized keys are ignored. SEOPress marks this ability as destructive and idempotent in its own metadata because a single call can take a post out of the search index (setting it to noindex) or change its canonical target, so an AI assistant should confirm the intended effect with the user before calling it.

See it in action

You ask your AI assistant

"Set post 128 to noindex and nofollow, and update its canonical URL to https://example.com/best-espresso-machines/."

Inputs

Name Type Required Description
post_id integer Yes The ID of the post to update.
settings object Yes Map of SEOPress robots meta keys to values, e.g. { "_seopress_robots_index": "yes", "_seopress_robots_canonical": "https://example.com/" }.

Returns

An object with a single 'code' string field — "success" when the robots settings update completed.

Permission

The current user must be able to edit the target post (the WordPress 'edit_post' capability for that post ID).

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.