Recently I decided to use the WordPress post formats in my blog. If you're not familiar with post formats, hop over to the wordpress codex and read about them there.

Back? Good. :-)

I now have the ability to use different layouts for different kinds of posts, like "video", "image" or "status" - there are some additional tweaks I need to add to my theme; currently not all of my blog's views are respecting the new post formats. Work in progress, as always.

The problem I was facing after enabling the post formats: How can I add the post format to the posts that have been published in the past?

The easy but time-consuming way would be to edit every post via the administration, but that'll take quite a while if you have more than handful of posts, so I looked for a way to set the post format directly in the database for the old posts.