We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26027
    • 145 Posts
    It will soon be obvious that I’m new to MODx CMS but I am quite computer literate and an experienced web designer.

    I inherited a MODx CMS web site set up as a "staging" site and a "production" site. The clients are instructed to apply changes to the staging site and then advise me that these changes need to be "pushed" to the production site.

    My job here is not to develop MODx applications or make changes, but merely to keep their sites backed up and to "push" user changes, once proofed, to their live site.

    I’ve successfully done this several times but am unconvinced I’m doing this the most efficient way.

    Briefly my instructions were to:
    1. Download the entire "assets" folder from the staging site.
    2. Download all site related tables (e.g. all MySQL tables beginning with "modx_site").
    Note: My experience is that I can either do this from a PHPMyAdmin export or logging into MODx and doing a backup.
    3. On the live site, rename the assets folder to add the current date to its name.
    4. Upload the entire assets folder (from the staging site).
    5. Update the production MySQL database with the export from the staging site database.
    6. Log into MODx Manager and Clear Cache.

    This seems simple enough, but I’ve noticed that the downloads and uploads of the "assets" folder takes a pretty long time, even at cable internet speeds. There are 1400 files. Also, I’ve rendered the site unusable for the time it takes to do the upload of the entire assets folder.

    I just did a test where I compared the contents of the assets folders of the staging and production sites and it appears as though the vast majority of files are identical. Most are dated back when the site was originally installed and obviously are installation files which don’t change.

    My question to you is whether I really only need to refresh a portion of the production site’s assets folder, like "images". Forgive me but I have no clear idea of what "assets" other than images are actually changed in the assets folder when users make their periodic updates to news and other site content. It seems to me that the majority of this activity affects only the MySQL database.

    Can anyone sort this out for me. I’d be very appreciative.

    Thank you ... Sam
      • 26931
      • 2,314 Posts
      This seems simple enough, but I’ve noticed that the downloads and uploads of the "assets" folder takes a pretty long time, even at cable internet speeds. There are 1400 files. Also, I’ve rendered the site unusable for the time it takes to do the upload of the entire assets folder
      you could rename the uploading folder to "_assets", then switch names when you’re finished
        • 4971
        • 964 Posts
        maybe a diff of the two asset directories and just upload what has changes?
          Website: www.mercologia.com
          MODX Revo Tutorials:  www.modxperience.com

          MODX Professional Partner
          • 26027
          • 145 Posts
          sharkbait: That’s a good idea; don’t know why I didn’t think of it. It certainly minimizes the site’s outage while "assets" is uploading.

          charliez: Also a good idea. I just installed "WinMerge" a pretty good diff type program and I do plan to use that the next time the site has a major set of changes applied.

          Thanks to both of you for your replies.

          To further my understanding of MODx I am still interested in knowing what elements of the "assets" folder will never be changed (if any) when users update their content. I feel somewhat lame updating the entire folder just because the MODx developer told me to. It sure seems as though much is never going to change.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            If only content is added/edited, then all you need to worry about is the "images" folder, and that only if the content editing involves uploading or changing images. Maybe "files" or "flash" or "media" if file downloads or movies are being added to content as well.
              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
              • 26027
              • 145 Posts
              Thank you Susan. Your answer is exactly what I had been hoping for.

              I know you provide MODx support via your web site (if my memory serves correctly) so your answer holds high credibility for me.

              Best ... Sam