Written by Sean Behan on Sun Jun 17th 2012

It's not immediately apparent how to import/export the links in your Wordpress blogroll. One would expect that the import/export tool, used to backup/restore Wordpress posts and pages would handle this functionality as well. But the import/export tool has many options. You need to select the Blogroll import option (located near the top of the list) and provide the tool with either the destination of a valid OPML XML url, or upload a valid OPML XML file. If you're running on Wordpress, this can be found by appending a "/wp-links-opml.php" to the URL of your domain. For example, http://seanbehan.com/wp-links-opml.php will show you my blogroll in XML. If your running out of a subdirectory, don't forget to include that path in the URL.

If for some reason you're running a development website on your localhost, obviously the live, remote site will not be able to contact your localhost for the data. You will have to upload the XML file to the remote site. The Wordpress export tool does not provide the means to generate a the OPML XML file for you. You will have to visit the /wp-links-opml.php file and download the contents yourself, but this depends on how your browser handles XML files. Firefox will show you the raw XML, however, Safari will show you the contents of the XML nodes... which will most likely be only the name of your website. You'll need to go to "View Source" option to see the actual XML code.Copy and past the XML to a file with the .xml file extension somewhere on your hard drive. Visit the import > blogroll tool and upload the file!

A simple way to download the file contents is to use the command line web browser Lynx. http://en.wikipedia.org/wiki/Lynx_%28web_browser%29

Just give Lynx the destination URL and the file to write to (it doesn't have to exist) and then you can upload this file

<pre>

lynx -source URL > my-links.xml

</pre>

More info on lynx available here: http://kb.iu.edu/data/aczi.html


Tagged with..
#data #export #import #links #lynx #opml #xml #Programming #Wordpress

Just finishing up brewing up some fresh ground comments...