LJ to WordPress
This is a hopefully temporary measure to be able to import your LiveJournal to a WordPress blog. See some discussion here.
For an example, here's my LiveJournal and here's my WordPress blog.
What does it do?
- Preserves post titles, dates, and content
- Can optionally import protected posts from LJ and set a password on them in WordPress.
- Keeps a similar URL scheme, so a link to http://gregstoll.wordpress.com/495263 will bring up the post originally made at http://gregstoll.livejournal.com/495263.html
- Fixes links to other LJ entries in your journal to point to the corresponding WordPress entry
- Preserves comment bodies, including nesting
- Preserves tags
- Turns <lj-user> tags into a link to that user's LiveJournal
What does it not do?
- Does not preserve mood, music, or location
- Does not copy anything else from your journal other than posts (i.e. no blog title, global links, etc)
- Does preserve the name of the author of comments, but if it's anyone other than the journal author it makes no attempt to set the author's URL, etc
- <lj-cut> tags don't get displayed, although their content is displayed
- Does not set any excerpts for posts
- Does not preserve userpic or any images you have stored on LJ
- Does not preserve the author of posts (all will be set to the owner of the journal), so this probably won't work well with communities
- Does not convert <lj-embed> tags
Caveats
- The way LJ formats posts is a little weird, which doesn't play nice with some WordPress themes. For example, the Franklin theme has weird spacing for <br>'s.
How to use this
- First, use LJBackup to make a backup of your LiveJournal
- In the resulting .zip file, find allPosts.xml
- Send an email to greg@gregstoll.com with subject "LJ to WordPress", and include the following:
- Attach the allPosts.xml file
- The URL of your WordPress site
- Whether you want protected posts to convert, and if so, what password you want set on them
- After I reply with your WordPress XML file, go to WordPress, and click My Site->Settings
- Click the Import section
- Under the WordPress importer, click Start Import, then click on the cloud icon and select the WordPress XML file you got back
- Click through a few more times, then wait a while :-)
Source code
Here's allPostsToWordpress.py, which does the conversion from allPosts.xml to a WordPress-compatible XML file.