We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29597 ☆ A M B ☆
    • 350 Posts
    So I have 2 computers:

    • Office workstation
    • Laptop

    At the moment I sync my code using dropbox and like to develop on locahost (WAMP, Gulp + Browser-Sync). I have changed the WAMP settings to use the Dropbox folder as localhost root and have setup Virtual hosts.
    This works great my dev code and WAMP settings are all synced on my two machines.

    I also moved the database to my dropbox folder and setup WAMP to use it for localhost dev work.


    The only issue I have now is that the MODX install settings (like 'config.inc.php') are synced in dropbox and they are not the same on both devices...
    My Workstation has:

    $modx_core_path= 'D:/Dropbox/DESIGNfromWITHIN/GitHub/localhost/Frames/core/';


    Laptop should have

    $modx_core_path= 'C:/Programs/Dropbox/DESIGNfromWITHIN/GitHub/localhost/Frames/core/';


    How can I sync this the right way?
      MODX Ambassador (NL) | Responsive web design specialist, developer & speaker
      DESIGNfromWITHIN, MPThemes and Any Screen Size
      Follow me on Twitter | Read my blog | My code on GitHub
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      You could try to have Dropbox not sync the config files using Selective Sync, but be careful to make a local copy of the file first on both your computers as when you untick the file/folder in Dropbox, it will remove it. Once it removed it, place back the file from your copy and it should be there for MODX, but would not be synced.

      Or, change your localhost so they match up and you don't have to mess with Dropbox Selective Sync - I destroyed a few local MODX setups a couple weeks ago because I hit the wrong button and it wouldn't sync back.
        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.
        • 3186 ☆ A M B ☆
        • 279 Posts
        I think using Git makes more sense. Also together with the .gitignore to ignore the config files
          MODX Ambassador (NL) & Professional MODX developer
          Follow me on Twitter | Visit my page on Facebook | View my code on Github | View my script posts
          MODX e-commerce solution SimpleCart
          • 29597 ☆ A M B ☆
          • 350 Posts
          Yes was thinking of using GIT also... Probably best right? Also for the DB?
            MODX Ambassador (NL) | Responsive web design specialist, developer & speaker
            DESIGNfromWITHIN, MPThemes and Any Screen Size
            Follow me on Twitter | Read my blog | My code on GitHub
            • 3186 ☆ A M B ☆
            • 279 Posts
            Yes I think so!

            I'm also configured Git to deploy automatically, but for that you have to know some MODX/PHP to make changes on other locations. I am now able to deploy sites in less than 2 seconds smiley using Git!
              MODX Ambassador (NL) & Professional MODX developer
              Follow me on Twitter | Visit my page on Facebook | View my code on Github | View my script posts
              MODX e-commerce solution SimpleCart
              • 34075 ☆ A M B ☆
              • 130 Posts
              Git + SQL dumps indeed. Dropbox for live databases might result in a corrupt database when Dropbox is closed while MySQL is still running for example. Git is also easier if you want to keep track of changes, push changes to your client's server, etc.
                Jeroen Kenters

                MODX Professional | MODX Ambassador | Dutch MODX forums moderator

                website | twitter
                • 1251 ☆ A M B ☆
                • 45 Posts
                General problem with database if two or more person work on one site - tracking changes. If I created resource or element with id 5 second developer would have conflict.
                  Alroniks experts
                  MODX Ambassador | MODX Professional

                  alroniks.com | [email protected] | +375 33 638 10 92 (Belarus)
                  Facebook | Twitter | VK.com
                  • 44195
                  • 293 Posts
                  I've finally gotten SSH access on my server and was about to ask pretty much the same question when I saw this here! I develop on both a desktop and a laptop and currently use Github as a way of backing up my custom extras but wanted to be able to use it with my entire site and database. Also of course push through to the live site.

                  How do people generally do this with MODx? Do you push the files and then manually import the dumped database or is there a more streamlined way of going about it?

                  Edit: I suppose the part I'm confused about is that since all the snippets, chunks etc. are stored in the database, do people with this kind of workflow generally use static resources and elements and keep them that way? Even when pushing to a production server?
                  [ed. note: muzzstick last edited this post 12 years, 3 months ago.]
                    I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                    Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    I'm working on a tool to ease working with MODX content/database stuff using git that will hopefully bring a new option to the table in the coming months: https://github.com/modmore/Gitify
                      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.
                      • 44195
                      • 293 Posts
                      Quote from: markh at Jun 12, 2014, 05:13 AM
                      I'm working on a tool to ease working with MODX content/database stuff using git that will hopefully bring a new option to the table in the coming months: https://github.com/modmore/Gitify

                      Wow good stuff. Looking forward to it! smiley
                        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com