Title: xmlrpc_publish_post
Published: April 25, 2014
Last modified: May 20, 2026

---

# do_action( ‘xmlrpc_publish_post’, int $post_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#wp--skip-link--target)

Fires when [_publish_post_hook()](https://developer.wordpress.org/reference/functions/_publish_post_hook/)
is called during an XML-RPC request.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#parameters)󠁿

 `$post_id`int

Post ID.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#source)󠁿

    ```php
    do_action( 'xmlrpc_publish_post', $post_id );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/post.php#L8006)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/post.php#L8006-L8006)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#related)󠁿

| Used by | Description | 
| [_publish_post_hook()](https://developer.wordpress.org/reference/functions/_publish_post_hook/)`wp-includes/post.php` |

Hook to schedule pings and enclosures when a post is published.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/xmlrpc_publish_post/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.1.0](https://developer.wordpress.org/reference/since/2.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fxmlrpc_publish_post%2F)
before being able to contribute a note or feedback.