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

    I'd appreciate some help with a complex situation.

    I currently have two MODx installs; production running 2.4.3-pl, and staging running 2.6.1-pl.

    Production is where content is published to daily and is running on an old software and technology stack.

    Staging has an older copy of content, but updated front-end UI and templates, and runs on a more updated software and technology stack.

    Ideally I'd like to migrate the content from production to staging, and then make the staging environment production.

    I have pored over these forums and the MODx documentation but I haven't found clear advice for migrating just site content from one server to another? It's everything.

    Can anyone help provide step-by-step instructions? It's crucial that the production environment isn't brought offline, or in anyway put at risk.

    Thanks in advance,

    Scott

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      Trying to merge environments is tricky, but if you've kept to the rule of new content on the production site and new elements/assets on staging, then you might be able of grabbing just the content (site_content and site_tmplvar_contentvalues for TV values) from the production DB, inserting that into the staging DB, making sure it all works, and then pushing everything up to production.

      Most importantly though: immediately update both environments to 2.6.5 as sites are actively being hacked. https://modx.today/posts/2018/07/modx-2.6.5-critical-security
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 54304
        • 6 Posts
        Quote from: markh at Jul 24, 2018, 08:24 AM
        Trying to merge environments is tricky, but if you've kept to the rule of new content on the production site and new elements/assets on staging, then you might be able of grabbing just the content (site_content and site_tmplvar_contentvalues for TV values) from the production DB, inserting that into the staging DB, making sure it all works, and then pushing everything up to production.

        Most importantly though: immediately update both environments to 2.6.5 as sites are actively being hacked. https://modx.today/posts/2018/07/modx-2.6.5-critical-security

        Thanks for the prompt reply Mark.

        After inserting the site_content and site_tmplvar_contentvalues values into the staging DB, do I need to clear the cache, and/or refresh URIs?

        Noted regarding 2.6.5. Hoping to tackle that next.
        • discuss.answer
          Quote from: scottmallinson at Jul 24, 2018, 08:31 AM
          After inserting the site_content and site_tmplvar_contentvalues values into the staging DB, do I need to clear the cache, and/or refresh URIs?

          Yeah, I'd do both, just in case.

          Oh, and of course take a backup of both environments before doing this wink
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 54304
            • 6 Posts
            Quote from: markh at Jul 24, 2018, 09:12 AM
            Quote from: scottmallinson at Jul 24, 2018, 08:31 AM
            After inserting the site_content and site_tmplvar_contentvalues values into the staging DB, do I need to clear the cache, and/or refresh URIs?

            Yeah, I'd do both, just in case.

            Oh, and of course take a backup of both environments before doing this wink

            Thanks Mark. That's done the trick.

            I initially thought that the updated database wasn't being reflected in the /manager and on the front-end, but it was owing to a config file pointing at an old database.