Now that I’ve moved off of LiveJournal I want to encourage everyone else I know to do the same. To this end, I thought I’d write up how I migrated to Wordpress for the benefit of anyone else who might consider it, now or in the future. It was fairly time consuming, but not actually difficult in any way. Most of the time was spent figuring out how to do different things, not actually doing them, so these directions should help speed things up some for anyone else who’s interested in doing this.
The first thing to do is download and install Wordpress, either in your web space or, as I do, on a development machine while you get it ready to go up. System requirements are on their site but it’s basically just PHP and MySQL which are pretty ubiquitous.
I’ve found that the easiest way to customize the appearance of Wordpress was to use the theme browser to find a theme similar to what I wanted and use that as a starting point. This was much faster than starting from scratch and it got a lot of the tedious stuff out of the way so I could concentrate on my own style. For my site, I wanted to keep my existing look, so I chose Simple Green as a starting point. After installing the theme, I made a copy of it to a new directory, changed the name at the top of style.css, and started customizing. It’s easy to switch back and forth between themes from the Wordpress admin interface.
After you’ve got things looking the way you want, it’s time to import your data. There are two steps to this: 1) exporting from Livejournal, and 2) importing into your new MySQL database. Livejournal’s export tool is nearly useless in that they support exporting comments as well as posts, but don’t let you actually do it from here. Additionally, this tool does it one month at a time, which will take you ages to import if you’ve had your LJ for a while (I had mine nearly four years when I did this).
The way around this is to use ljArchive, a desktop application that can export your journal history, including comments, into one big XML file. It seems to do some other stuff as well, but I’ve only used it for this one thing so I can’t comment on the rest of its functionality. The down side to this program is that it only runs on Windows and even then requires that you have the .NET framework installed. I installed it on a Windows machine at work.
Once ljArchive is set up, the first thing you need to do is create an archive (File->New Archive): enter your LJ username and password, and tick the “Download Comments” box, if you want them (should be checked by default). After this all you have to do to is tell it to export your data: Go to File->Export->XML Writer, choose a filename and tell it to export everything into a single file. Below, in the “Export Settings” area, you can choose not to export protected (ie, friends-only) posts. It will export everything by default.
When ljArchive finishes doing its thing, you’ll be left with a big XML file containing your entire Livejournal history, posts and comments. Now you need to get this stuff into your database in a format that Wordpress can understand. Wordpress comes with scripts to import data from a variety of other systems (Livejournal, Movable Type, Textpattern, etc), but the Livejournal script, written for use with LJ’s export tool, doesn’t expect to see comments and so won’t import them. Luckily, Vinit Bhansali has made available a modified version of this script that will. Download import-livejournal.php from his site, replace the one that ships with Wordpress (in your wp-admin directory), and follow the Livejournal import instructions. Your comments will be imported along with your posts. I successfully imported 500+ posts and 700+ comments this way with no trouble, but it still might be a good idea to back up your database first.
There are a few things to note about this procedure.
mysql> use <database name>; mysql> UPDATE wp_posts SET comment_status = 'open'; mysql> UPDATE wp_posts SET ping_status = 'open'; </database>
Abracadabra, your comments are all turned back on. The second UPDATE command turns trackbacks/pingbacks back on.
/2005/12/08/post-title. If post-title is an empty string, you won’t be able to link directly to it or read attached comments. The only way to fix this is to use the Wordpress administration interface to go through your entire post history and add titles. Tedious? You bet! But you’ll be going through all these posts one-by-one anyway (read on), so get used to the idea. If you think you may want to migrate in the future, start using titles now.
If you want to tag your posts outside of the standard categories, now is the time to decide, or else you’ll go through this all over again as you add tags (like I did). I’m using the Ultimate Tag Warrior plugin for this.
If you want to have Wordpress copy posts to your Livejournal, use the Live+Press plugin. It allows you to choose whether to sync on a post-by-post basis and gives you the option of sending only an excerpt rather than the whole post if you prefer.
I’d be interested in hearing how these instructions work out for anyone who uses them. Have fun!
Incoming Links
Comments
Eric
December 16, 2005
Two questions,
1) Does Ultimate Tag Warrior treat tags as categories? In other words, if you set a post’s categories, they will also set as tags, and vice versa?
and 2) Does the live+press plugin trigger when you use an external xlm-rpc posting medium? If I use Ecto or Qumana, instead of the WP dashboard, will the posts still get crosslinked to LJ?
Thanks. =)
Kenn Christ
December 16, 2005
1) Ultimage Tag Warrior will create tags from your categories, but it’s an option that can be toggled on/off (I think the default is to create them). It does not create categories for your tags. This allows you to treat tags as dynamic “subcategories” of sorts. Compare my category and tag pages for an example.
2) This I don’t know. My guess would be that it doesn’t, but I don’t really base that on anything. I haven’t tried it.
Nisha
March 19, 2007
Thanks for this! Will try it out now.
BB
September 25, 2007
Thank you so much for this! I was having such a hard time getting my posts away from LiveJournal.
Janet Callahan
December 23, 2007
Thanks you for this clear set of instructions and links to various tools.
I’m actually migrating to drupal, but there’s no clean way to get from LJ to drupal, so I’m going LJ to wordpress, and wordpress to drupal.
James
March 28, 2008
I use the LJ cross-poster to send my Wordpress posts to Livejournal. It works really well.
Jetoile
April 5, 2008
With the new version of WP, you can set all your entries to private. I’m finding it easier to work this way. Keeping everything private, then going back and making selected posts public.
UPDATE `wp_posts` SET post_status = 'private';Jarl
June 23, 2008
Hey,
I’ve been looking for a way to do this for a while.
Thanks much.
-Jarl
dimensha
August 27, 2008
you. are. awesome. this saved me soooo much hassle. i dreaded the thought of having to export each month of my LJ (since ‘04) individually. ljarchive saves the day!
Ejia
January 17, 2009
Thankfully, WP now imports comments as well. THanks for the info about LJArchive’s XML export! It saved me a world of trouble.
Something to say?
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">