I see that you can import links into wordpress, but is there any way to export links from wordpress to another installation of wordpress (of a different version, if that matters at all)? Thanks for your help,
Dave Morris
I see that you can import links into wordpress, but is there any way to export links from wordpress to another installation of wordpress (of a different version, if that matters at all)? Thanks for your help,
Dave Morris
I have a script which collects the links from WordPress and outputs them to OPML format. Just tested it and seems to import fine.
Example:
http://guff.szub.net/links2opml.php
Source:
http://guff.szub.net/wp-content/sourceprt.php?file=links2opml.php
Download:
http://guff.szub.net/downloads/links2opml.php
Drop the script file in your blog's root directory (where wp-config.php is located). Use its URL for importing to another WordPress install, or save the output viewed through your browser to a file and upload.
Note the $show_all variable at the top of the script, which is used to toggle display of link visibility set in Links Manager. 1 (default setting) = all links display; 0 (zero) = only links set to visible will display.
I'm getting an error when i run this file:
<b>Fatal error</b>: Call to undefined function: get_authordata() in <b>/home/showviz/public_html/dave/170/opml.php</b> on line <b>18</b>
(Hmm, why did I use that as a function call in the script?)
Fixed. Re-download and try it again.
Hi,
Installed this on WP 2.0 and receive the following error msg. Any suggestions ?
Joe
XML Parsing Error: not well-formed
Location: http://www.bustershome.us/blog/links2opml.php
Line Number 67, Column 72:<outline text="LinuxInsider" type="link" description="LinuxInsider -- "Linux News & Information from Around the World"" url="http://www.linuxinsider.com" xmlurl="http://ww
-----------------------------------------------------------------------^
Joe, it's an issue with double-quotes in the description. Just updated the script so it converts these to HTML entities.
thanks, that worked beautifully.
How difficult would it be to modify the code to include categories? For instance, if I have links divided into five categories, and only want to export the links in Category B, how difficult would it be to modify the code to accomodate?
"if I have links divided into five categories, and only want to export the links in Category B, how difficult would it be to modify the code to accomodate?"
Not too difficult...
Follow the links above for updated script. You'll now find a $link_cats variable at top. Just give the link category ID number as the value:
$link_cats = '2';
For multiple link categories, separate with a comma:
$link_cats = '2,4,6';
Thanks!
Hi!
PHP Worked like a charm, got my .xml file in 2 secs. I see all the links there, but when exporting i get:
Importing...
XML error: no element found at line 1
Inserted 0 links into category 1. All done! Go manage those links.
im exporting from a WP 1.5.2 and importing on a 2.0...
any ideas?
Hmm. Just tested an import from 1.5.2 to 2.0, and no problems here.
dbasulto, do you have a link to the export (1.5.2) blog, or rather the links2opml file therein?
Hmm.
I can't duplicate the error you receive. The url provided rolls right into my (2.0) test site's link importer without a hitch. I was hoping something was throwing in an empty line at the start of the script, but nope.
dbasulto, can you save the output from your links2opml to a file locally, and try uploading that through Import Links? Note: make certain the OPML URL field is empty (no 'http://') when you do this.
I keep getting this error:
Warning: fopen(http://www.ypnblog.com/blog/link2opml.php): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/amersky/public_html/blogcrafter-com/ypnblog/wp-includes/functions.php on line 2109
XML error: no element found at line 1
Ok, once I have the link http://fragilemusings.net/links2opml.php what do I do with it next? Do I save it to my computer?
You can save it, but if you're trying to import links from it into another WordPress installation, you can just point to it (Links > Import Links).
I get the follwoing error when I run your script:
XML Parsing Error: xml declaration not at start of external entity
Location: http://mywebsite.net/links2opml.php
Line Number 3, Column 1:<?xml version="1.0" encoding="UTF-8"?><!--Links2OPML - a WordPress script created by Kaf Oseo (http://szub.net)
hello... hope you can help...
i tried the script but get a database error -
http://www.leeharding.net/wp-links-opml.php
can you have a look see if im doing something silly....
thanks
Lee
It's possible to Export WP Links, to IE o FF?
Regards!
what kind of file should save as when saving the output? and what should i name it? and where should i upload it to?
the script works great! thanks!
It's not working for me - when I try to import direct from http://www.mimeomai.f2s.com/oolong/ac/sourceprt.php it gives me 'XML error: syntax error at line 1
Inserted 0 links into category 1. All done! Go manage those links.'
Interestingly, saving the file and then importing it gives me the subtly different 'XML error: not well-formed (invalid token) at line 68
Inserted 0 links into category 1. All done! Go manage those links.'
...any suggestions?
This topic has been closed to new replies.