Windows Live Writer problems with Wordpress - How To fix?
Though Wordpress provides TinyMCE and the code editor, which are more than enough for me, I decided to check out the offline/desktop posting utilities available out there. I used to use w.blogger, but a quick check showed that it was not currently being updated (or probably, I was looking at the wrong place). So, I decided to check out the Windows Live Writer, which everyone was writing so much about. Windows Live Writer promises integration with Wordpress.com and custom hosted Wordpress sites too. “Great!”, I thought and downloaded/installed the tool in my WinXP Sp2 box. I don’t know about Wordpress.com integration, which I doubt will have any problems. But, custom Wordpress integration needs certain tweakings from your side.
When I tried setting up the Live Writer with my Wordpress it gave the following error - “Invalid Server Response - The response to the blogger.getUsersBlogs method received from the weblog server was invalid“. A quick Google search brought up this link. I also found another post in Wordpress forums, suggesting disabling all the plugins. After lots of trial and error, I hit upon a solution that solved my problem.
Live Writer makes use of XML RPC protocol to talk with Wordpress. XML RPC makes use of XML for encoding the communication part. So, if the XML parser at Live Writer end is not able to make sense out of the XML response from Wordpress (xmlrpc.php), it complains. This is what happened in my case, as the XML response from my Wordpress site started with TWO newline characters followed by the XML starting tag. I don’t know why, but these characters at the beginning of the XML stream choke most XML parsers out there. I have seen this problem with Firefox 2.0/1.5, Feedburner etc.,. Here is a BKM of what I learnt regarding this.
How to fix the error - “Invalid Server Response - The response to the blogger.getUsersBlogs method received from the weblog server was invalid“
- First step is to check the security part. Make sure your xmlrpc.php in the Wordpress root directory is given Read and Execute instructions for you. Check with your hosting service people to see if this is properly set. Most probably your host should have given you a control panel for managing your webspace, you should be able to do this from there. For Wordpress.com hosted websites, I guess this should have been already taken care of.
- Go to your Wordpress root directory. Open your wp-blog-header.php. Remove the NEWLINE characters (Enter’s) at the start of the file, before <?php tag, and from the end, after the closing ?> tag. Now save this. Make sure you remove the newlines from the following files too.
- wp-blog-header.php
- wp-config.php
- wp-settings.php
- Check if step (2) has solved your problem. If not, do step (2) for the theme files of your site, located under $WORDPRESS_ROOT/wp-content/themes/.
- For example, if I am using Misty Look theme, I’d be checking under $WORDPRESS_ROOT/wp-content/themes/MistyLook
- Try connecting now. If still you have problems, don’t worry yet, let us try one more thing. Sometime the plugins do cause extra output. This may be the cause. Try disabling all the plugins in your Wordpress installation and try. If it works, great! Now, enable the plugins one by one and check to find out the culprit.
If you are not able to connect to your WP still or you have found another solution that I missed here, do let me know. BTW, I am using Wordpress 2.1 / PHP 5.2.0
hi
thanks for ur help but to no avail none of this works for me
am not able to post
plz help
Problem with connecting to your WP blog itself? Please post more info.
i get the error as u have written above when i use windows live writer to post .
it used to work fine earlier but now it doesn
have tried everything but it still gives me the same error
Naven, most of these problems could be tracked down to the XML RPC responses you get from your site. Try snooping for the query/responses and check if there are any extra CR/LF or malformed tags (which I doubt!) from your site, when you connect using Windows Live Writer.
I just checked your site and it shows a number at the beginning of the XHTML before the DOCTYPE tag. You need to remove the code/plugin, whatever is causing this to be there. I think your host, Phpnet, is injecting this. Better confirm with them also.
i just opened my site and saw the sourece i couldnt see any number u are talking about . anyways i have written to the hosts
in the mean time it would be great if u could suggest me some gud php mysql supported free wen host . i used phpnet but they have now forced ads and also this posting problem .
thanks
Hi Kannan.. great explanations and walk through.
I wanted to comment here that my xmlrpc.php file *itself* had both a trailing space and a new line. I checked the install files for both versions (2.0.5 versions and 2.1.3) I have handy, and both had the extra characters, which would explain why it’s so widespread. I have no idea, though, why it can take weeks to show up.
Glad it helped. I checked my 2.1.3 xmrpc file, I didnt find any trailing white CR/LFs or White spaces…I guess, WP.org loves inserting these randomly
Thanks for putting this together. I’m afraid it doesn’t help me yet, though. I have just moved my WP installation to a remote server and upgraded from 2.1 to 2.1.3. The site runs fine, but I’m having the dreaded WLW problem which I never had before. All of my PHP files including xmlrpc are clean with respect to newlines - the only thing I changed was a newline at the end of xmlrpc. I’m willing to bet it’s a security issue. Running Windows 2003 with IIS for the installation. I’ve given EVERYONE full control of the file. I still have the problem.
Any ideas/thoughts?
TIA.
Will, I am not sure what it could be. I am running my WP on a hosted IIS too, but havent faced any security problems. Since you are running your own box, my wild guess would be wrong NTFS permissions, assuming NTFS is what you are using. Note that the file permissions at NTFS level are different from the “Web sharing” permissions. Please check that you have proper permissions set for “Everyone” under the “Security” tab.
Type your comCool…i am very interest in it…
you might interest my site too..
http://www.highvisit.comment here.
Hi Kannan,
I tried all your remedies but the problem persisted. In suspected my plugins.
I deactivated all plugins and activated them one at a time, posting with Live Writer after each activation.
I found the culprit: the “Google Sitemaps” plugin.
My advice: implement all your remedies + check your plugins.
Regards,
Lucky
//////////////
starr classic mpg star porn classic porn insurance star mpg
Just so simple like removing blank lines in wp-settings.php
Thankyou!!! i was getting crazy about this!!!!!
Thanks, thanks, a lot
barandiaran, glad it helped! I can relate to ur “crazyness”..I was feeling that too before I found this fix!
Hi,
I had encountered alternate problem.
Here it is with a solution
Sorry, forgot the link
http://software.tulentsev.com/?p=7