We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32544
    • 9 Posts
    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.
      • 3749
      • 24,544 Posts
      What version of MODX?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 32544
        • 9 Posts
        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.
          • 32544
          • 9 Posts
          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
            • 35766
            • 2 Posts
            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?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You could use Ditto for that; the Ditto tpl would output the xml structure that you want.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 35766
                • 2 Posts
                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
                  • 28042 ☆ 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;
                  
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 9207 ☆ 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.
                      • 47072
                      • 1 Posts
                      Hi! you got it done? data transferred to WordPress?