WordPress · api · fg-0105

Writing Yoast fields through the WordPress REST API silently does nothing

POST /wp/v2/posts/{id} with meta returns 200 but the Yoast title is unchanged

Verified 2026-08-07 · Confirmed by 0 builders · Trust 50/100

Cause

Yoast's meta keys such as _yoast_wpseo_title, _yoast_wpseo_metadesc and _yoast_wpseo_focuskw are not registered for REST, so writes to them are dropped. An unregistered key reads back absent, which looks the same as an empty field.

Fix

Register each key with show_in_rest for the post type, then write and confirm through yoast_head_json.

Apply

foreach (['_yoast_wpseo_title','_yoast_wpseo_metadesc','_yoast_wpseo_focuskw'] as $k) { register_post_meta('post', $k, ['show_in_rest' => true, 'single' => true, 'type' => 'string', 'auth_callback' => fn() => current_user_can('edit_posts')]); }

Affects: WordPress REST API with Yoast SEO Premium, August 2026

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp