What is XML-RPC in WordPress

XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. “XML-RPC” also refers generically to the use of XML for remote procedure call, independently of the specific protocol. XML-RPC works by sending a HTTP request to a server implementing the protocol. The client in that case is typically software wanting to call a single method of a remote system. Multiple input parameters can be passed to the remote method, one return value is returned. The parameter types allow nesting of parameters into maps and lists, thus larger structures can be transported. Therefore XML-RPC can be used to transport objects or structures both as input and as output parameters.

Read more about XML-RPC here.

How to enable XML-RPC in WordPress

XML-RPC is enabled by default in versions 3.5+. If you would like to disable it, add the following code in your themes function.php file.

add_filter('xmlrpc_enabled', '__return_false');

Types of actions supported by WordPress XML-RPC

    • Posts (for posts, pages, and custom post types) – Added in WordPress 3.4

wp.getPost
wp.getPosts
wp.newPost
wp.editPost
wp.deletePost
wp.getPostType
wp.getPostTypes
wp.getPostFormats
wp.getPostStatusList

    • Taxonomies (for categories, tags, and custom taxonomies) – Added in WordPress 3.4

wp.getTaxonomy
wp.getTaxonomies
wp.getTerm
wp.getTerms
wp.newTerm
wp.editTerm
wp.deleteTerm

    • Media – Added in WordPress 3.1

wp.getMediaItem
wp.getMediaLibrary
wp.uploadFile

    • Comments – Added in WordPress 2.7

wp.getCommentCount
wp.getComment
wp.getComments
wp.newComment
wp.editComment
wp.deleteComment
wp.getCommentStatusList

    • Options – Added in WordPress 2.6

wp.getOptions
wp.setOptions

    • Users

wp.getUsersBlogs
wp.getUser (3.5)
wp.getUsers (3.5)
wp.getProfile (3.5)
wp.editProfile (3.5)
wp.getAuthors

Click here for full XML-RPC WordPress API documentation.

Say Hello! Don’t be shy.