Export your Tumblr blog to WordPress

August 19, 2008

Fresh off the press, just finished coding a tool to that will export all the posts in your Tumblr blog into an XML file. You can then import that XML file into your WordPress.com blog or self-hosted WordPress blog.

Please leave a comment here if you have questions, suggestions, feedback, requests, and/or bug reports.

Tumblr2WordPress: Export Your Tumblr To WordPress

Tags: , ,

90 Responses to “Export your Tumblr blog to WordPress”

  1. pixelbits Says:

    Hao, thank you SO much for this, omg!!!!!


  2. [...] Export your Tumblr blog to WordPress « Web 0.2 – Hao Chen (tags: tumblr wordpress) « links for 2008-08-21 [...]

  3. ylon Says:

    So the corollary to this is a WordPress plugin that will keep WP posts up to date from Tumblr entries. Interesting.


  4. [...] like to see something for some cross pollination now regarding keeping the two services in sync: Export your Tumblr blog to WordPress « Web 0.2 – Hao Chen. I’ve fiddled with Tumblr a little, but ended up giving in to WordPress, but would not mind [...]


  5. the link seems to be down right now

  6. Hao Chen Says:

    Sometimes, it gives a PHP access violation, but if you refresh again, it usually comes up. It’s weird.

  7. rosslife Says:

    worked great – thanks!


  8. So which import method (in the WordPress admin Import tab) should one use with the resulting XML file? I don’t see any import method for “XML file”.

  9. Hao Chen Says:

    @George, import as a WordPress type.

  10. Laura Says:

    thank you so much, this worked amazingly, on one try!

  11. Hao Chen Says:

    Laura, you’re very welcome!

  12. Stusia Says:

    Занимаюсь дизайном и хочу попросить автора haochen.wordpress.com отправить шаьлончик на мой мыил) Готов заплатить…

  13. armand Says:

    actually its up, thanks a million!

  14. damncrew Says:

    it asks for a tumblr username, what is the user name? i dont remember tumblr having user names, only emails.

  15. damncrew Says:

    nevermind, i got it. haha

  16. bge Says:

    I have a lot of images with click-though links: the images come through but not the links themselves?

  17. enzoajello Says:

    hello. my tumbler name is enzoajello but when i use the tool it brings back the feed from enzo.tumblr.com, not enzoajello.tumblr.com. any ideas?

  18. willwrk4peace Says:

    is my username whatever is before .tumblr.com???

  19. bigscottyrogers Says:

    I can get these to import to a temporary WordPress.com blog, but not my wordpress blog hosted my ReadyHosting.

    It worked once (beatifully) before I was ready to migrate. Now that I’m ready it just doesn’t work. I’ve even re-installed wordpress and created a new db, but not seeing much luck.

    Scott

  20. bigscottyrogers Says:

    Howdy.

    “scottrogers” is the user name. Yes, I’m checking the hosted option. The WordPress (2.6) import page let’s me browse for the file and press the install button. The page that processes the XML file loads, but no processing takes place.

    I’ve tried on two separate machines running OS X and XP and a few different browsers. I’m thinking there’s an issue with my host.

    Thanks.

    Scott


  21. [...] Export your Tumblr blog to WordPress « Web 0.2 – Hao Chen Fresh off the press, just finished coding a tool to that will export all the posts in your Tumblr blog into an XML file. You can then import that XML file into your WordPress.com blog or self-hosted WordPress blog. (tags: tools wordpress) [...]

  22. dave Says:

    this is fantastic – great work!

  23. fog Says:

    Very nice work. Thanx.

    The click-though image links is a problem.


  24. [...] Here’s a tool to help you export Tumblr to WordPress:  Tumblr to WordPress Export Tool’ [...]

  25. alex okazaki Says:

    Nice work. However I couldn’t import videos properly.
    I lost the embeded video.
    tnx!

  26. Jay Says:

    Thank you, it works great :)

    One concern, though. New posts usually have three-digit post IDs (since I have about 600 WordPress posts). After importing my Tumblr backlog of about 50 posts, the post IDs have suddenly jumped to 8 digits! New WordPress posts continue in this fashion. Is this normal behaviour? If not, is there anything I can do about it? Thanks in advance!

  27. Hao Chen Says:

    @Jay It might be importing the post IDs from Tumblr. I have the source included on the page if you want to take a quick peek and make a mod. Maybe not setting the post ID will result in auto incrementing post IDs.

  28. Jay Says:

    Wow, thank you for your prompt reply! And yes, you are right, the long post IDs are indeed from Tumblr.

    I just took a look at the source code and unfortunately I am not very proficient at PHP.

    Would I accomplish not setting the post ID by removing the entire line which sets the post ID, such as this one?
    attributes()->id ?>

    I’m pretty sure it’s not that easy, lol. Just thought I’d ask before I give up. I wish I could just accept the fact that I now have really long post IDs, but I’m such a terrible neat freak. :s

  29. Hao Chen Says:

    Yeah, it quite possibly could be that easy (removing that entire line). However, even if you re-imported to WP, I’m not completely sure that it will reset WordPress’ post ID back to what is was originally. If that’s the case, one option might be to go directly into the MySQL database and do something like ‘alter table “table_name_with_posts” auto_increment=1′.

  30. Jay Says:

    Yay, I tested this on a test installation of WordPress, and omitting the lines really did the trick. :)

    It did indeed not reset the post IDs and I didn’t manage to fix this in the database. But it doesn’t matter. I have daily database backups for my blog so I just did a restore to the 3-digit era ;). I imported the Tumblr posts on Monday and didn’t notice the ID thing until last night, so I used Sunday night’s backup and only lost one blog post and a couple of comments (still have them in a backup so I might find a way to re-import them). It’s a tiny price to pay for having everything in once place now. :) Again, thank you.

  31. Hao Chen Says:

    You’re welcome. :)

  32. tomharrow Says:

    thank you so much for this little tool. I needed to export my tumblr to squarespace and this worked an absolute treat so thank you!
    -tom


  33. Hao,

    Thanks! I’ve been looking for something like this for my site, http://www.darrenscorner.com. Much appreciated!

  34. mrrrty Says:

    Is there any way to do this so that every time I post something to Tumblr, it automatically goes straight to my WordPress, too?

  35. rika Says:

    Hi Hao, any ideas on why the imported timestamp would be a few hours off for every post?

    For example: a post from Tumblr on Apr 10th, 2009 2:58pm is showing up on Wordress as having been posted on “April 10, 2009, 5:58 pm.” The WordPress time is wrong.

    I’ve tried adjusting the timezone under WordPress’ Settings to compensate — multiple times, on multiple fresh installs, both before and after importing. Nothing I did made that time budge from 5:58 pm.

    In the actual XML for the exported Tumblr, pubDate is Fri, 10 Apr 2009 14:58:51 +0000, wp:post_date is 2009-04-10 17:58:51, and wp:post_date_gmt is 2009-04-10 21:58:51. So I guess it should be using pubDate, and it’s using wp:post_date instead?

    Unfortunately, manually editing is totally out of the question, either inside the XML or in WordPress. I’m importing 3,000 posts from Tumblr, and the times are are few hours offset on ALL of them.

    So, any thoughts? Thank you very much.

    • Hao Chen Says:

      @rika Hey, I would download the source code from http://code.google.com/p/tumblr2wordpress/ and play around with these three lines:


      <pubDate><?php echo $post->attributes()->date ?> +0000</pubDate>
      <wp:post_date><?php echo date('Y-m-d G:i:s', (double)$post->attributes()->{'unix-timestamp'}) ?></wp:post_date>
      <wp:post_date_gmt><?php echo str_replace(" GMT", "", $post->attributes()->{'date-gmt'}) ?></wp:post_date_gmt>

      You’ll need something that has PHP 5+. Lemme know if you find any bugs!

  36. rika Says:

    Thanks a lot!! I bashed my head over the problem for MANY hours, but tonight I finally got it working! Woo!

    One more question, then you’ll be free of me :D Would it be easy for you to cook up a code snippet that discerns the type of Tumblr post, and then puts it into a certain WordPress category based on Tumble type, instead of just Uncategorized?

    I ask because there’s a Tumblr imitation theme for WP, where the style of the post varies by WordPress category (just as it does for Tumblr post types). The categories it uses are: thoughts (for text), photos, quotes, links, video, conversations. Not sure if it’s too much work to ask of you, or if it’s even possible, but if the exporter could put Tumblr quote posts into a quotes category on WP, and photo posts into photos, etc., that would be AWESOME.

  37. Hao Chen Says:

    @rika Hahaha. Yeah, sure, I can do that. Give me a couple days.

  38. Adam Says:

    Thanks so much for this!! It came in handy.

  39. rika Says:

    Oh man, really? SWEET. Thank you so much for offering to do that! I’m overjoyed. Overjoyed as only a person who has been spared the task of manually reorganizing 3000 posts can be overjoyed. Can’t wait! I’ll be checking back very frequently.

    • Hao Chen Says:

      Hey! Sorry, it took me so long; Busy week…Anyway, here it is! Replace the getTags function with this new one:

      function getTags($post)
      {
      if($post->attributes()->type)
      {
      echo "attributes()->type . "]]>\n";
      echo "\t\tattributes()->type . "\">attributes()->type . "]]>\n";
      }
      else
      {
      echo "\n";
      echo "\t\t\n";
      }
      if($post->tag)
      {
      foreach($post->tag as $tag)
      {
      echo "\t\t\n";
      echo "\t\t\n";
      addTag((String)$tag);
      }
      }
      }

      If you don’t like the category names (ie. regular, photo, link, quote, video, audio, etc.), you can change them in WordPress after the import. Let me know if it works!

  40. cerentha39 Says:

    It’s not working for me. Is it because I am not self hosting?
    Cerentha

    • Hao Chen Says:

      What’s your Tumblr username? Is it the XML file that isn’t being generated or the import into WordPress that isn’t working? Also, there is a radio option box to choose between self hosted WP and WP.com.

      • cerentha39 Says:

        It’s so weird. The XML file gets generated (using cerentha@mac.com which is what I use to log into Tumblr). BUT the XML file contains someone else’s blog. I imported over 1000 posts of some guy’s blog into my wordpress blog and then had to delete it all!
        Help?
        Cerentha

  41. cerentha39 Says:

    I used thisisadesignblog and it worked a dream! Thank you so much. My final blog on Tumblr and my next WP post will be all about how great you are! Much much appreciated.
    Cerentha


  42. [...] didn’t want all that work to go to waste. Enter Hao Chen. What an awesome guy. He has written code to enable Tiumblr users to save their posts as an XML file so they can be transferred into WP. Not [...]

  43. thomaswhitley Says:

    Tool seems great, but can’t get it to work for me. When I open the XML file in a browser the only thing that shows up on the page is:

    Untitled http://gmail.tumblr.com/ Tue, 05 May 2009 22:59:56 -0400 http://haochen.me/tumblr/?v=0.1 en 1.0 http://gmail.tumblr.com/ http://gmail.tumblr.com/ uncategorized

    My tumblr username is thomasjoshuawhitley@gmail.com. I’ve tried it twice now with the same result.

    • Hao Chen Says:

      Hey, Thomas…Sorry ’bout that…I wrote bad directions. Try your Tumblr blog name (ie. xyz.tumblr.com) and not your email/username. I’ve changed the directions on the tool to match.


  44. [...] was about four months quicker than expected, due to this handy script. Posted by thomas on Sunday, May 10, 2009, at 1:53 am. Filed under Uncategorized. [...]

  45. burningst4r Says:

    wow. I love you. PERFECT!

  46. dalsr Says:

    THANK YOU

  47. danlittauer Says:

    Hello Hao,
    I managed to import my blog posts from my tumblr: http://www.danlittauer.tumblr.com
    So, great! Thank you for that!
    Is there a way I can import my theme or adapt it into wordpress?

    Thanks so much!

    • Hao Chen Says:

      You’re welcome! As far as I know, it’s possible to recreate Tumblr themes for WordPress, but takes manual effort porting the CSS over. Here’s a list of Tumblr-like themes for WordPress. http://wordpress.org/support/topic/235926

      • danlittauer Says:

        Helllo,
        I have a very strange problem; I have installed wordpress 2.8 on my host (www.agnosco.iblogger.org) and imported my posts in xml from my tumblr site (danlittauer.tumblr.org) – i have mixed language (english, hebrew, arabic, portuguese) posts and the non english ones came up with question marks… I have been unsuccessful at solving this even after reading docs in wordpress…

        The very strange thing is that when I imported it to the wordpress.com account it works (www.danlittauer.tumblr.com), how come?

        Are there any files I need to install on my host?

        Please help,

        Kind regards,

        Thanks,
        Dan

  48. saida Says:

    say we update our tumblr, will it also update our wordpress? or will we have to delete the xml file, redownload it, and reupload it

    thanks!
    I wish tehre was a tumblr plug in for wordpress because our wordpress posting doesn’t allow us to post things with html :(

    • Hao Says:

      No, sorry, it won’t update wordpress automatically. However, there might be a wordpress plugin that does cross posting if you keep digging around.

  49. Andy Wibbels Says:

    Heads up: If you have domain mapping on, it won’t work. Remove the mapping and re-try.

  50. thunderror Says:

    thanks a lot…that tool was so helpful!!!


  51. [...] This is my new personal blog! Posted in my life by thunderror on July 30, 2009 I’m back again blogging on wordpress.com after a long long time. I use the wordpress engine on my main blog. But then for a long time, tumblr has been my blogging engine of choice for my personal blog. That is, until today. But I didn’t want to let go off my posts..Thanks to Hao Chen’s Tumblr to WordPress import tool! [...]

  52. headphonesonly Says:

    The link seems to be broken? Do you still have this tool online? I would love to try it.


  53. [...] Porch, which I’ve moved off Tumblr and onto a WordPress installation with the aid of a handy export tool I found online. I may or may not stick with the current design; most of my attention so far has [...]

  54. Caley Says:

    Link doesn’t seem to be working again. It says the page cannot be displayed when I click on it.

    • Hao Says:

      Yeah, looks like there is some issue resolving DNS from Layerblue, my hosting company. None of their hosted sites are working right now.


  55. [...] August 26, 2009 in Uncategorized Thanks to Hao Chen for his directions on how to import my blog from Tumblr to WordPress — http://haochen.wordpress.com/2008/08/19/export-your-tumblr-blog-to-wordpress/ [...]


  56. Cool site, love the info.

  57. osez Says:

    hi, it doesn’t work correctly ,
    it created like 200 new categorys, one for each post. instead of putting all uncategorised posts in one. Had to delete post by post and category by category..

    i will continue to use http://beta.switchabit.com/ for new posts and forget the import i guess

  58. jonathan Says:

    Does this auto update? Or do i have to keep exporting a new XML file?

  59. Ricky Grove Says:

    Thanks for making this program. We switched our Tumblr blog to a new WordPress site in minutes without a hitch. Saved us hours of work. Much obliged.

  60. agrn310 Says:

    THANK YOU!!!!!!! You saved me from a lot of copying and pasting! lol

  61. talk2us Says:

    Hey — thanks for this.. we just used it to convert and dropped some money in your inbox! Very nice, saved me an hour and did a good job.

    If you want to try out our service for free, go to http://www.talk2.us/trial. Send in an email and reference this and we’ll bonus you another month. Thanks man!!

  62. Navjot Singh Says:

    Your method does not work if we are using custom domain on tumblr.

    Update instructions on your tool page that in such cases, use the corresponding old subdomain of tumblr.

  63. jimboeth Says:

    I keep getting “Service Unavailable”! Will it be back up soon? Thanks

  64. jimboeth Says:

    Hi, it worked – saved me loads of time. Seems to be the easiest way I’ve found, and the only way to do it this quickly.

    I have donated (sorry it’s not much!) and urge others to – we’re lucky to have this service for free.

    Thanks again, Hao!

  65. gagsylive Says:

    Excellent.Thanks a lot for the tool

  66. Hao Chen Says:

    Hey, sorry you had to go through all that! Someone else had the same problem. Try typing in another value for the username (don’t use your tumblr login name)…I think it would be [this value].tumblr.com that corresponds to your tumblr. Maybe you can find the value somewhere in the Tumblr Admin section. Also, open up the XML file afterwards to make sure it contains the correct posts! LMK if you find the right value.

  67. Hao Chen Says:

    Hey, try this value: thisisadesignblog


Leave a Reply