Can anyone guide me on how to export all articles from a modx site in a rss xml format (to be imported into a wordpress installation via their rss import feature) thanks. If there is an easier way of doing this, i’m open to suggestions.
I wound up exporting the modx db, extracting the articles from their table, then matching up relavant fields to a wordpress posts table using excell.
All i really care about is the article and title.
lastly i uploaded the new file as a csv file via phpmyadmin to a new wordpress database.
it seems to have worked.
the old modx site is 1.0.2
I’d still like to know how to export all modx articles as an rss.xml file
I was looking for a soulution to migrate a modx site to a wordpress site and like to know how to export articles to an xml.
The modx site is version 1.0.5
Anyone done this yet?
-
☆ A M B ☆
- 24,524 Posts
You could use Ditto for that; the Ditto tpl would output the xml structure that you want.
Thank you for the quick response!
Looked on the Ditto site, but as i’m not a modx user (sorry for that folks) it looks a bit complicated to me.
For the site to migratie i only have Autor rights, which isn’t very helpfull i guess
-
☆ A M B ☆
- 24,524 Posts
You would definitely need a custom Ditto chunk (or in a custom Ditto config file). Each part of a resource is processed into the Ditto tpl, so for example you might have something like this:
<document>
<title>[+pagetitle+]</title>
<heading>[+longtitle+]</heading>
<content>[+content+]</content>
</document>
Ditto has a default xml format for creating rss feeds:
$xml_header = <<<TPL
<?xml version="1.0" encoding="[+xml_charset+]" ?>
[+xml_xsl+]
<xml version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>[*pagetitle*]</title>
<link>[+xml_link+]</link>
<description>[*description*]</description>
<language>[+xml_lang+]</language>
<copyright>[+xml_copyright+]</copyright>
<ttl>[+xml_ttl+]</ttl>
TPL;
$xml_tpl = <<<TPL
<item>
<title>[+xml_pagetitle+]</title>
<link>[(site_url)][~[+id+]~]</link>
<summary><![CDATA[ [+xml_introtext+] ]]></summary>
<date>[+xml_createdon+]</date>
<createdon>[+xml_createdon+]</createdon>
<author>[+xml_author+]</author>
[+tags+]
</item>
TPL;
$xml_footer = <<<TPL
</channel>
</xml>
TPL;
-
☆ A M B ☆
- 2,475 Posts
I would do this via MySQL and avoid the XML headaches. You can do a "SELECT INTO" statement and read from one database and populate another. It’s pretty straightforward if you only want the title and the content.
Hi! you got it done? data transferred to WordPress?