The All-New LiveJournal Importer for WordPress

Over the past few weeks, I have been working on a new importer for people who use LiveJournal, but would like to switch over to WordPress. With LiveJournal laying off a bunch of employees, it seemed like some people might prefer to move to a platform where they had a bit more control over their own content, rather than relying on another company to handle it for them. I decided that my measure of success would be that it needed to be capable of importing Guav’s entire journal — comments and all, without error.

As it turns out, it’s been quite a project. LiveJournal’s API is, shall we say, “challenging” to work with, and the sheer size of Guav’s journal (over 3,700 posts and nearly 200,000 comments) meant that I kept running into time, memory and database limits that would crash the importer. After a lot of back and forth with Guav though, I’m happy to present the new importer (find it under Tools > Import > LiveJournal), sporting the following features:

  • Just enter your LiveJournal username and password and you’re ready to go
  • Via the API, it connects directly to LiveJournal and imports all of your posts,
    • Posts marked as “Friends Only” are assigned a password within WordPress,
    • Posts marked as “Private (you only)” are marked as Private within WordPress, which means that only authors on your new blog can read them,
    • lj-cut tags are converted to the WordPress equivalent, the <! — more — > tag,
    • lj-user tags are converted to normal links, and have class=”lj-user” attached to them to make it easier to style them if you like,
    • Tags are imported properly,
    • If you closed the comments on a post in LiveJournal, then they’ll be closed in WordPress as well,
    • Lots of the “meta” information related to posts is also imported using WordPress’ Custom Fields feature. You could then use these values to reproduce some of LiveJournal’s functionality within your new theme if you like. The fields imported are:
      • If your post contains adult content (lj_adult_content),
      • Your current co-ordinates and location (lj_current_coords and lj_current_location),
      • Your current mood (lj_current_mood),
      • Current music (lj_current_music),
      • Your userpic keyword (lj_picture_keyword)
  • Next up, all of your comments are also imported,
    • Threading is preserved, so replies to other comments show up successfully (provided you enable that feature in WordPress),
    • The “subject” of each comment is included as the first line of the comment itself, because WordPress doesn’t have a comment title/subject value,
    • LiveJournal users get links back to their LiveJournals,
    • Your own comments are linked to your WordPress account, and are linked back to your new WordPress blog,
    • Anonymous users are labeled as “Anonymous”,
    • “Screened” comments on LiveJournal are imported as “Unapproved” within WordPress, so you can decide what to do with them

So there you have it, a brand new, shiny LiveJournal importer. This should be bundled with the 2.8 release of WordPress (it’s available right now on WordPress.com), and will be available for everyone. As I mentioned, it’s been tested with one single, very large blog (and a few smaller test ones), but if you find anything wrong with it, please file a bug on the WordPress Trac!

Huge thanks again to Guav for helping with the testing of this thing (maybe now he can migrate over to WordPress as well)!

  1. Beau Lebens said:

    This is not a plugin actually, it's a part of “Core”, which means that
    it will be a part of the next release of WordPress (2.8) which will
    hopefully be available some time towards the end of this month.

    • Rubin110 said:

      Thanks for the info. I just got an instance of wordpress installed on my site over this past weekend, with the intention to doing the migration. Didn't realize this wouldn't be out till 2.8. Any chance you're still looking for testers? 😛

    • Rubin110 said:

      Thanks for the tip! Would it hurt WP 2.71 if I just dumped livejournal.php from the nightly into the import directory?

  2. beaulebens said:

    It won't hurt per se, but it also won't work unfortunately :)There are a couple of other files that were modified/upgraded as partof the changes involved in that importer, so without making all ofthose changes, you won't be able to use the importer.I think if you got r10538 then you'd have the full uploader, althoughI don't know for sure what state the rest of trunk was in at thatpoint.

  3. WordPress 2.8: What’s new - op111.net

Comments are closed.