Exporting From Google Reader to import into the WordPress Blogroll: An exercise in OPML editing

Lesson of the Day: You can export a blog roll list from Google Reader to add to WordPress as a Blogroll, and do it with categories with a little bit of file editing and a careful bit of planning.

If you want categories from your Google Reader, follow these steps.  If you don’t have your reader in category format, skip to Step 5 (ETA: 14/11/10)

Preparation: Ensure you’ve tagged up your GoogleReader subscriptions so they’re in category folders; Download the freeware editor PSPad

Step 1: Google Reader -> Settings -> Import/Export-> Export your subscriptions as an OPML file.

Step 2: Open the OPML file in the PSPad

Step 3: Save a copy of the OPML file under whatever name you will use for the category tag

Step 4: Look for the <outline title=”girl-wonder” text=”girl-wonder”> line.  That’s the top line of the set.  Delete the rest of the links (this is why you keep making spare copies to edit and cut down).  Ensure you’ve kept the following lines

</outline>
</body>
</opml>

Otherwise WordPress grumbles a bit when you import.

Step 5:  In WordPress, Blogroll -> Categories -> Add Category for each of the clusters of blogs you’ve created from the OPML file(hence naming the OPML file as the category tag). Do this upfront for the files you’ve created to save a bit of messing around in the upload.

Step 6a:  In WordPress, Blogroll -> Import Links -> Tools -> Import Blogroll -> Choose from your local disk: to upload your OPML file

Step 6b: Select the appropriate category, then upload the file.

If all goes to plan, you’ll have a freshly imported list of blogs for the blog roll sidebar.

(Updated 14/11/2010 to reflect changes in how WordPress handles imports)