We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    While converting a site from the latest version of PostNuke to MODx, a came up with the following command-line PHP scripts to migrate the data from the PostNuke tables to the MODx tables. It’s by no means a complete, end-to-end migration of data, but it might help someone get the job done a little more efficiently. If you’re feeling spunky, you could even use these as a basis to write a complete PostNuke to MODx migration tool. wink

    Hope someone finds these useful...

    NOTES: You’ll need to edit your database connection information, and will have to have the tables in the same database container. This also does not yet include story author migration; all stories are currently migrated with anonymous authors, but that could easily be added.
      • 2762
      • 1,198 Posts
      Great works! wink do you know if work with Nuke7.4 (not PN) too??
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 22303 MODX Staff
        • 10,725 Posts
        You will probably have to change the values of the returned objects from the SQL queries, as the column names (and resulting object attribute names) will most like be different in PHPNuke than in PostNuke...

        e.g. you would change...
        $topic->pn_topicname
        to
        $topic->nuke_topicname
        or whatever the field name in the PHPNuke topics table is
          • 6726
          • 7,075 Posts
          I guess the same would be true of MD-Pro, since it’s a PostNuke fork ?
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 4454
            • 3 Posts
            I’m trying to use the migrate.pn_stories.php script from the command line (./migrate.pn_stories.php) without success. I modified the table names/fields to move content from phpnuke to MODx. I added the phpnuke tables to the same MODx database in which I am importing. Am I missing something?

            Thanks

            Here is what I’m getting when the code is executed:

            ./migrate.pn_stories.php
            ./migrate.pn_stories.php: line 1: ?php: No such file or directory
            ./migrate.pn_stories.php: line 3: =: command not found
            ./migrate.pn_stories.php: line 4: =: command not found
            ./migrate.pn_stories.php: line 6: =: command not found
            ./migrate.pn_stories.php: line 6: //: is a directory
            ./migrate.pn_stories.php: line 7: =: command not found
            ./migrate.pn_stories.php: line 7: //: is a directory
            ./migrate.pn_stories.php: line 1: article: command not found
            ./migrate.pn_stories.php: line 8: =: command not found
            ./migrate.pn_stories.php: line 8: //: is a directory
            Connecting to the database...\n
            ./migrate.pn_stories.php: line 11: syntax error near unexpected token `(’
            ./migrate.pn_stories.php: line 11: `if ($conn= mysql_connect(’localhost’, ’root’, ’xxxxxx’)) {’
              • 39170
              • 1 Posts
              Where can I find this migration script?