We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47308
    • 68 Posts
    I'd like to copy elements and resources from one Modx site to another. Don't want the entire site. Is there an easy way to do this?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use a database dump of the relevant tables - site_content, site_snippets, site_htmlsnippets, site_templates, and the TV tables.
        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
        • 47308
        • 68 Posts
        I was hoping I could pick and choose at a finer level. For instance, only some of the site templates. Might be better to copy everything and just delete the unwanted elements.
          • 33657
          • 128 Posts
          take a look at PackMan

          http://rtfm.modx.com/extras/revo/packman

          You can select anything you want (templates, chunks, variables, snippets,etc) and pack it up into a ZIP transport file. goto your new site, install that zip as a local package and it will port over all the stuff you packed up. its really handy for this exact thing.
            • 40045
            • 534 Posts
            Quote from: zurie at May 12, 2014, 10:41 AM
            take a look at PackMan

            http://rtfm.modx.com/extras/revo/packman

            You can select anything you want (templates, chunks, variables, snippets,etc) and pack it up into a ZIP transport file. goto your new site, install that zip as a local package and it will port over all the stuff you packed up. its really handy for this exact thing.

            Mmh, but not resources right? Cannot find that or I look at the wrong place...

            I once had to do the same and extended Mark Hamstras ImportX snippet with export capabilities (where you could run a xPDO->where() query to select the desired resources...if this could be of help, I'm glad to share that (unfinished) extension with you...
              • 3749
              • 24,544 Posts
              You're right -- PackMan doesn't do resources. That's one of the reasons MyComponent was created. I can package a site with it in about 5-10 minutes, but if you're new to it, it takes a while to get up to speed.
                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
                • 40045
                • 534 Posts
                Actually, if it's an option for you, you could use ElementHelper or SE Manager Extras (I'm doing it with element helper), so basically you have your elements as static files (.php, .tpl) on your server and these Extras handle the automatic creation and synchronization in the manager for you...if you then need an element in another site, just copy the static file to the new location and make sure the new site has also one of these Extras set up...probably the easiest way without the need to create a package...