wp_set_page_slug
Change a page's permalink slug (the URL segment). This is the ONLY way to change a permalink: the slug lives on the post row (post_name), NOT in the Elementor builder data, so wp_patch_page and wp_update_page cannot touch it and no metadata edit makes WordPress regenerate it. Requires writes enabled, and Xyle Connector v0.5.0+ on plugin-connected sites. Note WordPress appends -2 on a collision — the response reports the slug it actually applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Lowercase letters, digits and hyphens, e.g. 'urologist-digital-marketing' | |
| post_id | Yes | The page/post ID | |
| site_id | Yes | The WordPress site ID |