A few months ago I imported every single blog I’ve ever written into this site, but since all 2000+ posts are private you wouldn’t know it if I didn’t tell you. Turning LiveJournal posts into private WordPress posts takes a little more effort than retaining the privacy level, but if you want to hide your young days or you’re running for public office it’s worth the effort.
There are lots of ways to do this, but some of the information I found was several years old, depended on software that didn’t run on Linux, or didn’t even work. Here’s what worked for me.
(By the way, if you do want to import your LJ posts and keep the privacy level what it is, the LJ to WordPress plugin by itself can help you there.)
1. Create an account at the WordPress.com hosted site
Go to wordpress.com, the WordPress hosted version, and create an account if you don’t already have one. Then create a site. Name it whatever you want. You may want to mark it as private so no one can see or search for the site.
Import your entries to the WordPress.com site from LiveJournal
Fortunately the hosted wordpress.com dashboard for individual sites looks a lot like the self-hosted one. So go to the dashboard for you individual site. It will look like yoursite.wordpress.com/wp-admin. Then visit Import from the Tools menu.
The Import page will ask for your LJ username and password. This is just to import all your posts. You can change your LJ password to a temporary one and change it again afterward if you’re concerned about security. It will also ask you for a password to enter for any protected entries. You can do this if you want, but if you’re going to edit all these posts to be completely private, then don’t worry too much about this–another fix is coming.
Then wait. Depending on how many posts and comments you have this may take awhile. You can check that page and see how the import is going, but check back later that day or even the next day if you have a lot of content.
Export your entries from the wordpress.com site
Now visit Export from the Tools menu and select Export, then All Content, and save the resulting xml file to your computer.
By the way, you’re done with the WordPress.com site, so delete the one you created if you like.
Edit the xml file and change the privacy to private
Open the xml file in a text editor and change whatever is between
to private. So if that word reads
protected change it to private. You can do a find and replace to take care of it all at once.
You can also change the category the entries went in and just about everything else here. This is particularly handy if you want to label those posts as being from a different source. As an example, mine is Archive.
Warning: Depending on how many posts and comments you have, this file could be very large. Mine contained 2000+ posts and 2000+ comments and was 12MB. I don’t recommend using Notepad for this.
Upload the xml file to your self-hosted WordPress site
Now comes the fun part! Log into your self-hosted WordPress site and go to Import in the Tools menu. Select your xml file and import away. WordPress recently turned all their importers, including the WordPress one, into separate plugins, so install the WordPress plugin and upload the file. You’ll be asked to map post authors in the import to existing or new users in your WordPress site. Choose what you like and import away!
Troubleshooting and Other Issues
* If you run across an error like “Fatal error: Allowed memory size exhausted”, the PHP memory limit isn’t high enough to import your content. You can modify this in php.ini if you control that file. The WordPress page on importing content explains more. If you’re on a shared hosting site, you may want to write to them and ask how to perform the import safely. I asked to temporarily increase the limit, which ensured a successful import. Or you could split the file wtih xml_split if you’re technically adept, but I wasn’t very successful with this.
* Voice posts and polls do not import. This is because WordPress doesn’t support these post types. You may want to enter these manually if you have these in your posts. I still haven’t done this, but my LJ posts are tagged well enough that I can find all of these and do so.
* Some comments may get misattributed or attached to the wrong post. About 60 of my comments (out of over 2000) did. That’s not many considering how many comments got imported, but it’s something you may want to correct if you encounter this issue. These comments will show up as comments awaiting approval.
* Icons do not get imported. I haven’t figured out a workaround for this yet. If you do, let me know and I’ll add it.