Skip to content

Instantly share code, notes, and snippets.

View JawadPy's full-sized avatar
🍉
Chilling on my desktop

Jawad JawadPy

🍉
Chilling on my desktop
  • Saudi Arabia
View GitHub Profile
@georgestephanis
georgestephanis / command.xml
Created May 30, 2013 23:09
How to upload a file to a WordPress site via the XML-RPC API. Pretty easy, no? The attachment page if you want a html wrapper to present the file can be found at the following URL: http://yoursite.com/?attachment_id=722 (I left the ID the successful response in as an example)
<?xml version='1.0' encoding='utf-8'?>
<methodCall>
<methodName>wp.uploadFile</methodName>
<params>
<param><value><string>1</string></value></param>
<param><value><string>username</string></value></param>
<param><value><string>password</string></value></param>
<param>
<value>
<struct>