"Windows Live Writer" won’t upload images to WordPress

Wordpress, my favourite blogging system.I’ve used WordPress for almost two years now and today I faced a big challenge: I couldn’t post my articles who contained images to Word press with my Windows LiveWriter application.

Note: This comes after a long period in which I didn’t upgrade the plugins of my WordPress application ( I had 11 of them pending upgrade). Also, I had a full system reinstall (you know, the one with formatting the system drive). After that, I reinstalled and configured all my tools, starting with Visual Studio and ending with Paint .Net.

Because I had a lot of stuff to write, in the first free moment that I had a little time, I started my Live Writer and configured it to be able to post on my blog. When finishing the article, I tried to post it as a draft to www.radupoenaru.com and check if there’s something to be modified.

And when I hit the button that saves draft on my blog, bang! -I got this error:

WLW Error mesage for upload.

Of course, I started searching for this error. I found lots and lots of answers, so people faced many times this problem, like:

  • “in Livewriter to go to Tools>Options>Accounts and select the blog in question and edit that account and find the little link that states capabilities for that account and see if file upload says yes or no.”
  • “The problem was in the wp-includes/class-IXR.php.  At line 138 in function parse, I replaced:” and you can follow up the rest here.
  • there’s even a Trac ticket in WordPress’s own bug tracking tool regarding this issue;
  • other people try to suggest to do a “trick” in order to avoid the normal uploading – setup the FTP connection, but this implies too many steps for such a simple operation. You can find the post here.

None of these worked for me. I don’t want to have a 3rd party tool do do the uploading, I don’t want to even do the FTP connection in LiveWriter and then search for image and insert it manually in my post. I just want to use the tool as it is supposed to be.

Windows Livewriter - the tool that I use for blogging

So what’s next? Based on my experience, I assumed that all Microsoft tools have some kind of logging and I wasn’t mistaken in this. Indeed, Windows LiveWriter has a built-in logging engine, who’s output is available in

Under Windows XP:
%USERPROFILE%\Local Settings\Application Data\Windows Live Writer\

Under Windows Vista:
%LOCALAPPDATA%\Windows Live Writer\

And Under Windows 7 both paths are available!

Looking in the log file, I found a very interesting mention :

WindowsLiveWriter,1.3536,None,00017,15-May-2010 13:14:57.774,"XML-RPC request:
http://www.radupoenaru.com/xmlrpc.php
<?xml version=""1.0"" encoding=""utf-8""?>
<methodCall>
 <methodName>metaWeblog.newMediaObject</methodName>
 <params>
  <param>
   <value>
    <string>1</string>
   </value>
  </param>
  <param>
   <value>
    <string>admin</string>
   </value>
  </param>
  <param>
   <value>[removed]</value>
  </param>
  <param>
   <value>
    <struct>
     <member>
      <name>name</name>
      <value>
       <string>livewriter[2].jpg</string>
      </value>
     </member>
     <member>
      <name>type</name>
      <value>
       <string>image/jpeg</string>
      </value>
     </member>
     <member>
      <name>bits</name>
      <value>
       <base64>[13890 bytes]</base64>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodCall>",""
WindowsLiveWriter,1.3536,None,00018,15-May-2010 13:14:57.774,"XML-RPC response:
http://www.radupoenaru.com/xmlrpc.php
<?xml version=""1.0""?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultCode</name>
          <value><int>500</int></value>
        </member>
        <member>
          <name>faultString</name>
          <value><string>Could not write file livewriter[2].jpg (Unable to create directory /home/a6885256/public_html/wp-content/uploads/2010/05. Is its parent directory writable by the server?)</string></value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>
",""
WindowsLiveWriter,1.3536,Fail,00019,15-May-2010 13:14:58.455,"WindowsLive.Writer.Extensibility.BlogClient.BlogClientProviderException: Blog Server Error - Server Error 500 Occurred

Could not write file livewriter[2].jpg (Unable to create directory /home/a6885256/public_html/wp-content/uploads/2010/05. Is its parent directory writable by the server?)

So the most important part comes in

Could not write file livewriter[2].jpg (Unable to create directory /home/a6885256/public_html/wp-content/uploads/2010/05. Is its parent directory writable by the server?)

Next thing – check directory rights! I found out that my 2010 directory has the rights:

And of course, the directory rights aren't right!

This explains it all! Because my upper directory wasn’t prepared for writing, the Writer wasn’t able to create it, so it throws an error but shame! keeps it for the logging while showing another and unrelated error.

After granting the necessary rights by checking also the write action, I was able to post to my blog without any other issue!

As a security issue – you might want to remove the writing rights on that folder when you’re done, while some bad guy might overwrite your images with some other ones.

Happy Posting!