LearningSpot@Wordpress icon

LearningSpot@Wordpress

Consume Wordpress API

Page → Update

AI-generated

Summary

Update a WordPress page by specifying its Page ID and optionally modifying its fields including author, title, content, slug, status, comment and ping settings, template, menu order, parent page, and featured media. Optionally upload a new featured media binary file to associate with the page.

Inputs

  • Page ID (required) — Unique identifier for the page to update.
  • Featured Media — Whether to upload new featured media for the page.
  • Binary Property (required) — The binary property name containing the media to upload, required if Featured Media is true.
  • File Name — The file name with extension for the media upload (e.g., example.jpeg).
  • Update Fields — Collection of page fields to update such as author ID, title, content, slug, password, status (draft, future, pending, private, publish), commentStatus (open, close), pingStatus (open, close), page template options, menu order, parent ID, and featured media ID.

Output shape

a single updated page record in JSON format, including an optional 'featuredMediaId' field if media was uploaded.

If 'Featured Media' is enabled, the binary media is uploaded separately and linked to the page. The API request updates the page with provided fields. Errors during the update or media upload throw node errors unless 'Continue On Fail' is enabled.

Examples

Example 1: Update a page's title and content, specifying its Page ID.

Set Page ID to the page's ID, and provide 'title' and 'content' in Update Fields.

Example 2: Update a page and upload a new featured image.

Enable 'Featured Media', provide binary property name containing image data, the image's file name, and optionally other fields in Update Fields.

Links

Discussion