I wrote this series on how to post to Drupal using Windows Live Writer because I saw a lot of questions and issues about this on the Drupal forums. I had previously gone through the trial and error process to set this up for a number of people who work for me. We now use Live Writer for initial posts and quick updates to a large site we manage.
I'd like other developers and Drupal service providers to see they can provide this option for clients and that Drupal communicates and does well with modern and useful web technologies such as blogging APIs.
An external blogging application like Windows Live Writer will allow you to create and publish posts from your desktop to your Drupal site. But, before you can post via one of these applications you’ll need to enable and configure your Blog API module and a few additional settings.
Enable your Blog and Blog API modules here: admin/build/modules
Select the content types you’d like to make available to external blogging clients: admin/settings/blogapi
Create the roles you’d like to give external blogging privileges to: admin/user/roles
Notice, in the screen shot example, I have created two roles. One called, “blog user” and another called, “jot user”. This will allow me to assign separate permissions for two different content types. Yes, you are not stuck with just adding blog posts via an external client.
In this example, I’ll allow some users to post jots and other users to post blog entries. I can also give some users permissions to post to either content type.
Now assign posting permissions to your roles:admin/user/permissions
I have given both the “blog user” role and the “jot user” role permission to administer content with the blog API. Don’t forget this step.
I have given the “blog user” role permissions to:
I have also given the “blog user” permission to upload files.

However, I have not given these permissions to the “jot user”.
I want to allow both users to post content via an external blogging application but I want to separate my permissions for posting blog entries and posting jots, so I may assign them separately to various users.
In the node module section of the permissions page I can manage role permissions for my custom content type called, “jot”.
I have given my “jot user” role permissions to:
Now, let’s give a user permission to post blog entries.
Edit the user’s account:user/<user id>/edit
Where <user id> is the user id number for the specific user you want to edit.
Check the “blog user” check box under the “Roles” section to assign your user to that role.
To give a user permission to post jots, select the “jot user” check box.
You can get to a user’s account edit page, by starting from: admin/user/user
View your table of users, sort by username, status, or other dimensions and then click “edit” in the “Operations” column to edit the user’s account.
And that’s it. You have successfully Configured Drupal for posting from external blogging applications.
| Attachment | Size |
|---|---|
| Configuring Drupal for Posting from External Blogging Applications.pdf | 552.36 KB |
Shows how to add weblog accounts to post to Drupal with the blog content type and a custom content type.
Let's begin by adding a new Weblog account from within Windows Live Writer.
From the Weblog button or Weblog menu, choose "add Weblog account".

Next, select the option labeled, “Another Weblog service".
In the “Add Weblog Account” dialogue box, enter the user’s Weblog Homepage URL, Username, and Password. For the Weblog Homepage URL, enter the user’s Drupal account URL. For example, http://yourblogurl.com/user/<userid> (replace <userid> with the user’s id number).

Next, Windows Live Writer will try to detect your Weblog settings.
Most likely Windows Live Writer will not automatically detect your Drupal blog settings. Live Writer will then ask you to select a provider, which is simply what Blog API you would like to use. I’ve tested several Blog APIs with Drupal. The Movable Type API seems to work well for my client’s needs. We’ll select this option from the drop down menu.
Now, you will be asked to enter the “Remote posting URL for your Weblog”. This is the URL to your Drupal installation's XML-RPC file. It is usually located in Drupal’s main install directory at: http://yourblogurl.com/xmlrpc.php.

Note: Windows Live Writer has detected more than one Weblog. The user I am adding has been assigned two roles. One role gives permission to manage a blog. The second role gives permission to post a custom content type called, “jots”. Drupal's Blog API module has been set to allow both content types to be managed remotely. Thus Windows Live Writer has let us know it detected more than one Weblog and asks us to select a Weblog (content type) from the list. Note that both the blog content type and the jot content type are each called a “Weblog” by Windows Live Writer.
If the user had permission to post to only one content type, then just the one content type would be automatically selected by Live Writer.
We’ll select the blog content type.
Next, Live Writer may ask to detect your blog's theme (style sheets). This would allow you to see what your blog post will look like on-line while you write it in Live Writer. If you click yes and it fails, everything will still function correctly. Even if it does not fail, the display in the editor will most likely NOT look exactly like your post will look on-line.
Upon completion, you should see the message, “Weblog Configuration Complete”. Congratulations, you have successfully configured Windows Live Writer to post to a Drupal powered blog.

Now, let’s create a second Weblog account for the same user to post to our custom “jot” content type.
A second content type appears as a second Weblog account to the end-user.
We’ll repeat the previous process, using the same information as before, since we are adding the same user.
Note: Still using the URL for user 4. Same remote posting URL: http://yourblogurl.com/xmlrpc.php
Again, Live Writer detects more than one Weblog, because our user has permission to post to both, and both were made available in Drupal’s Blog API settings. This time, we add the “jot” content type, so we select the Weblog titled, "Test Blog and Jot User: jot”. The format is, Drupal Username: Drupal Content type.
Notice this time, Live Writer failed to detect the theme settings. This happens usually when a second Weblog account is added for the same user, or when posting to a second content type other than the blog type. If you really want Windows Live Writer’s to display your blog theme in the editor, there is a registry edit you can do in Live Writer to fix this issue. See http://drupal.org/node/221677#comment-755721 . I don’t rely on Windows Live Writer’s display of my theme.

Upon completion, you should see the message, “Weblog Configuration Complete”. Again, Congratulations! We have seen how to successfully configure Windows Live Writer to post to a Drupal powered website with a custom content type.
| Attachment | Size |
|---|---|
| Configuring Windows Live Writer to Post to Drupal, Blogs and Custom Content Type.pdf | 365.73 KB |
Demonstrates using Windows Live Writer to post to a Drupal 6 powered blog. Includes adding a photo, and adding terms to a post.
We’ll begin from within Windows Live Writer.
Make sure you have already selected the Weblog account for your Drupal site and for your desired content type. In Windows Live Writer, each content type which Drupal makes available through the Blog API appears as a different Weblog account.
Within the Live Writer editor, begin by entering the title of your post in the section labeled, “Enter Post Title Here”.
Then use the rest of the text area to enter your body text.
To add a picture to your post click, “Insert Picture” on the Windows Live Writer sidebar at the right side of the application.
You have the option to select an image from your computer or insert a picture from the web.
In this example, I’ll browse to a photo on my desktop and select it for insert.
Et viola, nous avons une image .
Now let’s select some terms for our post.
Click the “Set categories” bar at the bottom of the Live Writer application window.
Note: Drupal provides Live Writer with a list of terms available for blog posts.
If you do not see a list of terms available for your content type then check the following:
After selecting your terms, you can click back to the editor, and the category selection box will close.
Now let’s post to our blog. Click the “Publish” button on the Live Writer Menu Bar. Again, make sure you are publishing to the correct Weblog account.
After posting to Drupal, Windows Live Writer opens a browser window to view the post on the Drupal site.
Verify:
We have a successful post!
| Attachment | Size |
|---|---|
| Posting to Drupal 6 with Windows Live Writer.pdf | 270.59 KB |
If you want your users to be able to assign terms to their content when they are using an external blogging application, like Windows Live Writer, make sure you have the Taxonomy module enabled, and that you have selected the appropriate content types, those available to the Blog API. I have forgotten to do this a few times when adding a new content type to use with the Blogging API. Each time a new content type is created, taxonomy requires you to go back and specify whether your new content type can use a vocabulary.
Content types section: admin/content/taxonomy/edit/vocabulary/<vocab id>
If you have Drupal’s Path Module enabled to allow users to rename URLs (custom URLs), I recommend using the “Pathauto” module in combination with your external blogging client. You can set it to give the content a URL based on the post title.
http://drupal.org/project/pathauto
Use Case: You want blog users to post content that uses more HTML than the default Filtered HTML input format.
Now, unless your extra HTML or Full HTML filters are your default filters for your content, which I do not recommend, then when your “blog user” posts from Windows Live Writer, their posts will be submitted and displayed with the default “Filtered” HTML Input format (with no pictures or other html elements).
To overcome this issue, I recommend the Preferred Format module
http://drupal.org/project/preferred_format
Once enabled and configured you’ll see a new permission at: admin/user/permissions titled, “can set preferred format”.
Select which roles can choose their preferred (default) input format.
Note: The user will also have to be in a user group which is allowed to user other input formats than the default Filtered HTML format.
If you want to set the preferred default format for a user go back to the user’s edit screen at: user/<user id>/edit
You’ll see a new section titled, “Preferred Input Formats”. In this section, assign the default input format for each content type.
Note in the example screen shot I have selected the Full HTML option as the preferred input format for blog entries. Now, even when the post is via Live Writer, the post will display in full html.
Note, some external blog editors like “Ecto” allow you to set the input format within their software.
The following is a quick code sample showing the start of a Drupal module which lets a user add new tags to a post by placing the tags in the body of the post in a format like so:
[tags]blog, blog api, blogging, Drupal 6, weblog, windows live writer, wlw[/tags]
I’m only using code like this for one use case. It’s for clients who do a lot of editing and posting of their Drupal content through Windows Live Writer.
With Windows Live Writer and Drupal, my clients use the “Movable Type API”. Without extending the API, it does not yet support adding new vocabulary terms. Thus, from Windows Live Writer to Drupal sites, one can only tag content with existing terms. This code allows new tags to be added.
The terms are added to a specified vocabulary id and associated with the new or updated content node.
The inline tags are removed from the body of the text before insert or update.