We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    I've exported from 2.2 and now I want to import my content into a new 2.3.3 setup using phpmyadmin, but it refuses to work.

    Does anyone know of a sure fire way of importing a modx database to a new site?

    All the tutes I've read seem to be incredibly light on details as to how to actually do it.

    Thanks
    [ed. note: markg last edited this post 11 years, 5 months ago.]
      Content Creator and Copywriter
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Using phpMyAdmin, export the old database, make sure to use the option "add drop table". Then import it to the new database, and run the setup again in upgrade mode to make sure everything is settled.

      "refuses to work" is not very helpful, what error messages does it give?
        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
        • 18367
        • 834 Posts
        Actually it's just the content chunks, snippets and TVs I want to import.

        And I don't really want to go thru the hassle of running the Setup again. It just takes forever to make it work.

        I'll try and see if I can work something out.
          Content Creator and Copywriter
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The phpMyAdmin export allows you to select the tables you want to export. TVs are problematic, as their values are tied to template and resource IDs, and if your two databases don't have exactly the same templates and resources with the same IDs your TVs are useless.
            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
            • 18367
            • 834 Posts
            Well, I managed to import all my TV's, templates, snippets, chunks, everything except my content, and in the process lost all the top menus in my Modx manager.

            This is why I always get leery when trying to upgrade Modx.

            There just doesn't seem to be a simple, guaranteed way to do it.

            Well that's an afternoon wasted.

            I'll start from scratch tomorrow.

              Content Creator and Copywriter
              • 18367
              • 834 Posts
              Ah, I got it working again.

              The Manager Navigation is back and all my content seems to be there.

              But I use old school methods. Just keep pushing buttons until it starts working.

              I 'spose I should document how I fixed it, 'cept I don't know how I did.

              It's a cruel world.



                Content Creator and Copywriter
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                The easiest way to upgrade a MODX installation, at least if it's a standard installation, is to use the install.php script. It automatically downloads the version you select, unzips it and moves the files into place, then starts the setup utility, which you run as usual in "upgrade" mode. https://github.com/sottwell/installer

                A few things to keep in mind:

                1. Make sure all users are logged out of the Manager before upgrading.
                2. After the upgrade, make sure your browser cache and cookies for the site are cleared. The Manager uses a lot of JS files, and if your browser has any of the old ones cached it'll cause a problem in the Manager.
                3. Manually deleting the entire core/cache/ directory won't hurt anything.
                  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