How to Publish to a WordPress Blog Using XmlRpc

This is the first in a series of posts about how to publish to a WordPress blog using an interface called XmlRpc that is supported by WordPress as well as other blogging platforms.

My motivation for writing these posts is that I have a hobby project that is written in the C# language, and I wanted to be able to automatically publish some of the content that I create to my blog. However, when I searched the Web high and low I didn’t find much help. Don’t get me wrong, there are some libraries that are commonly used, but I found them to be awkward, poorly documented, and/or non-intuitive to figure out.

My goal was to create some custom code that could publish to XmlRpc without depending on any external libraries (other than what is natively in the .NET Framework), that would be easy to use and figure out, and that would could be done in a few hundred lines of code. You can be the judge as to whether I was successful. But I have to tell you I was amazed at how easy it was to accomplish these goals, and it made me wonder why others have made it so difficult (with all due respect).

On the other hand, I don’t claim that what I publish here will be a polished end product. I have created the core functionality that I will use (and that I think is most likely to be used by others), but extending it further should be straightforward.

I will explain this in a series of posts but may not link directly to each and every post. To get to them, just click on the WordPress-XmlRpc category on this blog, and it will take you there.

Last thing: at least in the beginning, the code snippets posted here will be in the C# language. However, because I am not using custom libraries, it should be straightforward to translate it to other languages (Java, VB.Net, Python, etc.). I’ve even thought about doing this and posting snippets in other languages, but it depends on people’s interest level (leave me a comment).

Leave a Reply