We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37272
    • 216 Posts
    Hi,

    I have just moved server, what is the best way to move Modx? I have not actually launched my Modx pages, so this is not ultra urgent. I also need to upgrade from 0.9.1 to 0.9.2. What is the best way for me to proceed?

    I do have backups of the manager and assets files from the old setver, and of course, a copy of the DB.

    Thanks.
      • 7923
      • 4,213 Posts


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 37272
        • 216 Posts
        Thanks for the links above; I felt sure there were no instructions for moving server in the docs. embarrassed

        I’ve only just got around to restoring my test pages on the new server, but I’m hitting a snag. I already had modx installed, so I uploaded the old database from the old server; uploaded all the old Manager and Assets files. I kept the config.inc.php file though to connect to the existing database that I’d overwritten.

        All seems fine, eccept when I try to view a doc within the manager:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « PHP Parse Error »

        PHP error debug
        Error: Unknown: failed to open stream: No such file or directory
        Error type/ Nr.: Warning - 2
        File: /home/XXXXX/public_html/manager/includes/document.parser.class.inc.php(696) : eval()’d code
        Line: 11

        Parser timing
        MySQL: 0.0000 s s (0 Requests)
        PHP: 0.0331 s s
        Total: 0.0331 s s

        Chunks, snippets, and the doc tree dispaly in the manager though, so connection to the database seems fine.

        I’m sure this is simple stuff, but if someone could give a me pointer, it would be appreciated.

        Thanks.
          • 25663 MODX Staff
          • 12,272 Posts
          You have to first upgrade the data in 0.9.1 before importing into a 0.9.2.1 install. DB structures are different enough to cause problems.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 37272
            • 216 Posts
            I used the manager and asset files from the old server, and the database too. - Shouldn’t they be compatible? I dropped all tables from the DB on the new server first, or is it that "structure" will still exist? - Sorry, I know nothing about DBs.

            Assuming I’m wrong, I have found instructions for converting the DB.

            Thanks.
              • 25663 MODX Staff
              • 12,272 Posts
              No. Version 0.9.1 databases must be upgraded prior to importing into a version 0.9.2.1 database.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 37272
                • 216 Posts
                Thanks.

                Though I can’t find a copy of 0.9.1. If you keep previous versions for downloading, I can’t find them. sad
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Move your existing site as it is, then upgrade it.
                    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
                    • 37272
                    • 216 Posts
                    I’ve just deleted the DB, so this is not an option, is it? I can’t remember how I created the DB before, doesn’t it need to be created by the installer? If not, I can recreate it.

                    The situation is that I have version 0.9.1.2 on the new server. I have my backup from the old server. I could not install this, as the DB was version 0.9.1. I thought I had to get to version 0.9.1 up and running, add my old DB (version 0.9.1), and then upgrade from there. Am I mistaken?

                    . . . . .

                    I’ve boobed, haven’t I? embarrassed I need the DB set up in advance of installation of Modx. I’m going to need 0.9.1 from somewhere.
                      • 22303 MODX Staff
                      • 10,725 Posts
                      I think you’re making this too complicated. Simply run your backup script to populate your new database via phpMyAdmin, in the new database, with your 0.9.1 data/structures. Then, having installed 0.9.2.1 on the server, simply run the 0.9.2.1 installer with the upgrade option (you must have your original config.inc.php inside /manager/includes to be able to run an upgrade). This will upgrade the database. If the original config has database properties for the old database, make sure you edit those for the new database before doing so.