We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43687
    • 3 Posts
    Hey Folks -- what are you using for version control with ModX? (Tutorials please!)

    Version control usually has to do with source code. So, my next question is, what kinds of backup solutions are out there for backing up an entire site (content and all)?

    And how come there's no clear tutorial on the internet on using ModX with Git?

    Thanks!
      • 9102 ☆ A M B ☆
      • 318 Posts
      For version control within MODX, the VersionX extra is fantastic. It stores previous versions of your resources, chunks etc. It's saved my a$$ many a time.

      The Janitor extra can help with backups. Personally, I just run mysqldump as a cron job.

      You can do real version control with MODX using git, but it's a bit awkward. Basically what you do is make all of your snippets, chunks etc. into static elements - that is, elements that just reference a file on the server. Then you can do all of your development by editing the files, and use git for version control for the files.

      However, I would only recommend that if you're developing a custom extra. For normal day-to-day operations VersionX is sufficient, and for normal development, you can use a development server and use PackMan to package and export updates from the dev server to production.

      I gave a presentation on this at the last Denver MODX user group. The slides are here:

      http://prezi.com/0nxhc5xefz_m/staging-from-development-to-production-in-modx-revolution/
        • 43656
        • 10 Posts
        This solution might be also usefull for a simple site development. For instance, you don't need to create new pages all the time but simply update and backup the existing ones.

        Works also if you are not expert in version control or server side stuff (like I'm not!). smiley

        2 environments with identical ModX:


        1. Production server
        2. Development server


        • Dynamic content is created in snippets in external PHP files which are under traditional version control (like SVN), back up routines or what ever desired.
        • Database is backed up normally on both ends (since the actual content is in database anyways).
        • HTML content is easy to copy & paste from the development server to production within the ModX editor.
          • 43687
          • 3 Posts
          Thank you so much, your replies were very helpful!
            • 27106
            • 147 Posts
            Quote from: mamajama at May 09, 2013, 03:44 PM
            {W]hat kinds of backup solutions are out there for backing up an entire site (content and all)?

            I'm starting to look at Codeguard, the "time machine for your website" acccording to its own publicity. Backs up, monitors and looks to have a very straightforward rollback function. The big problem with backups frequently turns out to be restoring to the state you want, and Codeguard is claiming "one-click restore" and selling it to developers as "reduce unbillable time". They roll back the files and the database. $5/month per website, which is affordable.

            Not affiliated with them and haven't paid them money yet, but I'm thinking about doing so.
              David Walker
              Principal, Shorewalker DMS
              Phone: 03 8899 7790
              Mobile: 0407 133 020
              • 9102 ☆ A M B ☆
              • 318 Posts
              Interesting - I checked out Codeguard and just at a glance it looks like it could be a great solution for some situations. I think you can do everything they do with a few simple cron jobs, but not everyone has that level of access to their server and this could be a good substitute.
                • 34066 ☆ A M B ☆
                • 23 Posts
                Quote from: mamajama at May 09, 2013, 10:44 AM
                Hey Folks -- what are you using for version control with ModX? (Tutorials please!)

                Version control usually has to do with source code. So, my next question is, what kinds of backup solutions are out there for backing up an entire site (content and all)?

                And how come there's no clear tutorial on the internet on using ModX with Git?

                Thanks!


                a reply or even better a solution would be great. The way I see it modx revolution does not any backup solutions. Sorry a plugin that does what can be done via myphpadmin is def. not a solution. Coming from EVO my first impression of Revo have all been great so far, except the backups function which well, doesn't exist, is this a joke? How can a CMS this good not have any backup functions/plugins for backing up site & content?? Seriously, coming from Evo 1-button push CMS backup to revo (who idiotically decided to take out this function, guess that was too convenient.) I did notice a built-in function to import the backups you can't, which leaves me even more fired about this.

                Sorry about the fire, maybe someone can help me find a way to backup my site content, chunks, templates, page content. Clearly this is not documented by Modx or impossible to find but I do refuse to believe this is not possible.
                  Tony Porto | Valpo Creative | http://www.valpocreative.com