We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9674
    • 170 Posts
    Modx is a great product, much greater than other products I tested (wordpress, spip, joomla...)

    I like the core team, and the community is active, smart and helpful.

    One downside I recently found with 2.1.1 is surprisingly it's getting painful to move sites from dev to prod.

    I explain our process :

    Usually we start a project as a prototype to show main functionalities, look and feel, global ergonomic on a windows portable platform.

    When we agree on it, we then create a development environment as a vhost on a linux/plesk platform, and develop full functionalities, test and get the agreement from the customer to go on production.

    At this time, we then create on the SAME server another vhost with the customer domain name and we move de developed application on it.
    To do so, we proceed as this :

    First ftp from the dev vhost to local windows platform (this also ensure to have as backup) then ftp to the new prod environment.
    Same for SQL, export followed by import.
    Then ftp install/update of modx over the prod environment.

    Things that have to be noted:
    ftp users (IE owner of directories) will be different from one to the other,
    Database db user and password will be different from dev to prod as well.

    In order to have it working correclty we change the values of DB settings in the core/config/config.inc.php file

    It seems that install/update does not change path in the core/config/config.inc.php, so manually changed them as well.

    Manual clear of core/cache directory.

    Permission on core/cache, core/export core/components assets assets/components set to 777 as well as for core/config/config.inc.php to ease the process.

    This procedure was working fine to Revo 2.0, since then, we are facing issues with moving sites.

    Main one are installed snippets won't function (eg gallery, tinymce, quip, getresource, formit...).
    Some fix can be done by deleting them in modx packets manager and manual delete of all archive and directories, then import and install again.

    Even with that, some pages don't work properly (formit questionnaire).

    There is no message in the log file.

    My guess is that there is some problems with the directories owner, but it's only a guess...

    I then feel there is a real need for a tool to help migrating modx developments from one server to another between dev and prod but also to ensure service while moving to a larger server for example.

    Any tough, remarks?

    Philippe
    [ed. note: Fildefer57 last edited this post 15 years, 1 month ago.]
      • 22303 MODX Staff
      • 10,725 Posts
      It seems that install/update does not change path in the core/config/config.inc.php, so manually changed them as well.
      It certainly should. I migrate sites manually and by running the setup as an upgrade in the new location and have never had a problem with the path changes being written to the config file by the upgrade.

      I can't think of anything that changed significantly between 2.0.x and 2.1.x that would affect this process. Anyone else have any thoughts?
        • 33968
        • 863 Posts
        I moved a site yesterday (2.1.3) and the setup script sorted out all the config paths for me, no problem. I only had to change paths on some of my custom components.

        Most problems I've had have been to do with permissions (eg. some files ending up as 600 after FTP). It usually means a bit of digging around but generally nothing to do with MODX.
          • 9674
          • 170 Posts
          Thanks for your comments.

          I have absolutly no idea why this happened, but I have to deal with the problem.
          I tried to change some directories to 777 (like components, assets (recursively) and even core....)with no more success...

          I just cant' understand what is happening and why this happened diffrently from the previous sites we created huh???

            • 3749
            • 24,544 Posts
            It's possible that one or more files was corrupted in the FTP transfer, it happens more often than you might think.

            If it's an upgrade, it's also possible that some original files were not overwritten by the new files.
              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
              • 15083
              • 697 Posts
              I have never had any major issues migrating to production.
              I would always run an update tho, as opengeek says it will reset the paths.

              Having done this I manually confirm the path to assets etc are correct.
              I've seen 2-3 instances where copying the files up again has resulted in success, so dont dismiss this idea and maybe try it again smiley
                • 33968
                • 863 Posts
                Quote from: BobRay at Sep 12, 2011, 05:51 PM
                It's possible that one or more files was corrupted in the FTP transfer, it happens more often than you might think.
                A good reason to zip your files up and transfer as one file, rather than leaving thousands of individual files at risk of corruption.

                Actually - does anyone know if zipping will preserve the original file permissions?
                  • 9674
                  • 170 Posts
                  Thanks again for your comments.

                  After investigation, it appear to be some complex issue including some changes in the way 2.1.3-pl update setup handle files, some issue with the rights, and finally the fact that some modx addon recent releases DO NOT install on 2.1.3-pl on this server because they use some phpzip fonctionalities that are not supported on the server.

                  A lot of trouble are gone with changing the parameter achive using pclzip to yes

                  I agree with you on the fact that transferring as a zip file is better, but to unzip it you MUST have access to the command line and it is not the case on most hosted servers.

                  That's why I think that it could be a good idea to create a moving package on the existing transport package mechanism.

                  Unfortunatly I don't have the ability and skills to do it, otherwyse I would have done it for the community, but I can participate in providing, ideas, and time for testing....

                  :)