Skip to content


Subversion checkout URL

You can clone with
Download ZIP
blog from org-mode to wordpress
Emacs Lisp
Branch: merge-tehom
Pull request Compare This branch is 217 commits behind punchagan:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Org2blog Readme


org2blog/wp is a tool to publish directly from Emacs’ org-mode to WordPress blogs. org2blog/wp is one of the two packages named org2blog. The other is org2blog/atom by Tom Breton.

org2blog was inspired by and based on a wordpress posting client for muse-mode written by Ashish Shukla.

org2blog is licensed under GPLv3


Download org2blog from github

git clone

Add the org2blog directory to your load path and then add

(setq load-path (cons "~/.emacs.d/org2blog/" load-path))
(require 'org2blog)

to your dot emacs.


  1. org2blog depends on xml-rpc available at Launchpad. Add it to your load-path before using org2blog.
  2. Make sure you have the latest org-mode installed. org2blog may not work with older versions of org.


Defining your blog setup

Note - This setup works only for org2blog version >=0.3. For lower versions of org2blog check an README from the commit e37126eec24ffdd785d2

You can (should) tell org2blog where your blogs are and optionally specify different values for some options. This is done by customising the variable org2blog/wp-blog-alist.

For example:

(setq org2blog/wp-blog-alist
         :url ""
         :username "username"   
         :default-title "Hello World"
         :default-categories ("org2blog" "emacs")
         :tags-as-categories nil)
         :url ""
         :username "admin")))

This defines two blogs identified by the terms wordpress and my-blog.

The variables in the plist set for each blog over-ride the global values of the corresponding variables. url and username are mandatory variables. Others are optional. If you customize the variable org2blog/wp-blog-alist there is detail information about the meaning of each property.

If you use only categories, set the org2blog/wp-use-tags-as-categories variable.

(setq org2blog/wp-use-tags-as-categories t)

If you wish to be asked for confirmation before publishing a post, set the variable org2blog/wp-confirm-post.

To browse or customize other variables use the customize group function.

M-x customize-group org2blog RET

Logging In

Use M-x org2blog/wp-login. This function ask you for the name of one of the blogs you have configured in the org2blog/wp-blog-alist variable described above and will ask for your password. The counterpart of this function is M-x org2blog/wp-logout, which will log you out of the active blog.

Writing a new post

Use M-x org2blog/wp-new-entry.

  • Tags and Categories are comma or space separated values. Completion (for both) is triggered using C-c t. If a new category is used you will be prompted before adding it.
  • The excerpt for a post can be written as #+DESCRIPTION.
  • The parent for a page can be specified using #+PARENT.\ C-c t again provides completion for the page name.


post buffer as draftC-c dM-x org2blog/wp-post-buffer
publish bufferC-c pC-u M-x org2blog/wp-post-buffer
post buffer as page draftC-c DM-x org2blog/wp-post-buffer-as-page
publish buffer as pageC-c PC-u M-x org2blog/wp-post-buffer-as-page

Post your existing org-files too

  • Add #+TITLE, #+OPTIONS, #+TAGS, #+CATEGORY, #+DESCRIPTION, #+DATE, to your file. (All of these are Optional)
  • Add a #+POSTID to edit an existing post.
  • Post buffer using the function names, as above.

Posting a subtree

  • Use M-x org2blog/wp-post-subtree.
  • Tags of the subtree will be used for tags. Other properties can be set using a property drawer.

Delete an entry or a page

  • If you are in the buffer of the entry/page, with #+POSTID present on the page, use :
    M-x org2blog/wp-delete-entry or M-x org2blog/wp-delete-page
  • If you want to delete a particular post (whose post-id is known) from any buffer, use
    C-u post-id M-x org2blog/wp-delete-entry.

Similarly, for a page.

Enabling org2blog mode (defines key-bindings)

  • use M-x org2blog/wp-mode. This defines the following the key-bindings:
    C-c ppublish buffer
    C-c dpost as draft
    C-c tcomplete tag or parent page name

Uploading Images

In-line images and linked images with file:// urls (e.g., [[file:///]] or [[file:///][this is an image link]] will be uploaded to the media library and the links will be updated. Captions and attributes as defined in org-mode will be preserved, but at present these attributes are not saved with the image to the library itself. [Information about uploaded files are added as a comment to the post itself, to prevent repeated uploads, but this isn’t as stable as I would like it.]


  1. You may want to look at the Export options and HTML export sections of the org-manual.
  2. If you wish to post to blogger from org-mode, look at -
  3. If you have an issue/bug/feature request, use the issue tracker on git or drop a mail to punchagan+org2blog[at]gmail[dot]com.
  4. If you haven’t found a bug/issue, but have tried out and/or are using org2blog to post to your blog, post me a line on how you use it and on what blog. I’d love to hear from you!
  5. Now, that org2blog does have a bunch of users, I’d like to keep track of the blogs it’s being used on. :) Feel free to add your site to the list of sites using org2blog, on the wiki at github.
Something went wrong with that request. Please try again.