Update post
wp_update_postUpdate an existing post by ID: title, content, excerpt, status, slug, date or custom fields. Pass the fields to change in fields and custom fields in meta_input. Set schedule_for to schedule publication. Passing post_category replaces all of the post's categories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ID | Yes | The ID of the post to update. | |
| fields | No | ||
| meta_input | No | Custom fields as key/value pairs. Keys starting with an underscore (WordPress internals) are refused, except the Yoast SEO title, description and focus keyphrase. | |
| schedule_for | No | Schedule post for future publication. Provide local datetime (e.g., "2026-02-02 09:00:00"). Automatically sets status to "future" and calculates GMT from WordPress timezone. |