We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8164
    • 51 Posts
    I’ve been searching without success to find a MODx "upgrade how-to"....so, with the release of 0.9.2, I thought it might be helpful to we noobs to ask:

    What’s the best way to perform the upgrade?

    Should I upload all the files to my server via ftp? Should I overwrite all the existing files then do the "upgrade" installation?

    I’m just not sure what the best approach is.

    Thanks,
    Duane
    • First do a full backup of both the filesystem and the database. Second - wait, did you do the backup? Ok, then upload the new files. Run the install script as you did when you first installed, only this time choose the "Upgrade" option. Do NOT install the sample site.

      The only thing to be careful of is if you are using any modified snippets or plugins from the default. This is especially common with the DropMenu snippet. Either rename your modified version so there is no conflict, or make sure to de-select it in the install options page so the installation will not upgrade it.

      If something did get overwritten, you can just replace it from your backup.
        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
        • 8164
        • 51 Posts
        Ok, then upload the new files. Run the install script as you did when you first installed, only this time choose the "Upgrade" option. Do NOT install the sample site.

        Thanks, Susan. Sorry to be dense, but should I delete the existing 0.9.1 files first, or just overwrite them?

        D
        • Just overwrite them.
            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
            • 8164
            • 51 Posts
            Thank you! Doh!
            • Definitely don’t throw away your manager/includes/config.inc.php file which is probable if you delete files.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 6726
                • 7,075 Posts
                Funny you should mention this, we did a tuto to upgrade too on the french side (in fact, today) and a user had deleted the files before uploading the new files... so much for the config.inc.php file...

                Which brings me to a question : is there any way to just re-create the config.inc.php file manually and avoid having to re-install ?

                I mean, most of it is trivial but the $site_sessionname is generated by the uniqid(’’) function at install.

                For those who don’t know this :

                uniqid() returns a prefixed unique identifier based on the current time in microseconds. prefix is optional but can be useful, for instance, if you generate identifiers simultaneously on several hosts that might happen to generate the identifier at the same microsecond.

                Does this mean that if for any reason you loose your config.inc.php file you’re bound to re-install MODx ?

                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                • Great point, thanks for bringing this to my attention.

                  And no, you can get the site_sessionname from the system_settings table in your database, so it’s not inevitable that you must re-install modx. But you will need to have a proper config.inc.php file in your manager/includes directory before you can successfully run the upgrade, which is necessary.

                  Perhaps we should post an empty 0.9.2 config file for users for now and I can add a config.inc.sample.php in the next release that users can rename if they accidentally lose theirs when not aware of the proper MO when upgrading.

                  There are other posts here about upgrading that still apply, and your specific approach may be up to your environment and development approaches, but one thing specifically that I always do, is upload the new stuff under a subfolder, rename the old folders, and then move the new folders into place. Then I can always restore the db and put the old folders back if I need to. This means I have to put my specific assets/ back into place in the new assets/ dir, but I always do that locally and test before deploying live.
                    • 6726
                    • 7,075 Posts
                    Quote from: OpenGeek at Apr 26, 2006, 12:30 AM
                    And no, you can get the site_sessionname from the system_settings table in your database, so it’s not inevitable that you must re-install modx. But you will need to have a proper config.inc.php file in your manager/includes directory before you can successfully run the upgrade, which is necessary.

                    That’s great news Jason, thanks for the system_settings pointer, I should have thought about it...

                    About creating a proper config.inc.php file, the way I’d go about it is take the config.inc.php of a clean install an edit the parameters, I guess that would work, no ?


                    Quote from: OpenGeek
                    Perhaps we should post an empty 0.9.2 config file for users for now and I can add a config.inc.sample.php in the next release that users can rename if they accidentally lose theirs when not aware of the proper MO when upgrading.

                    Yes that would be great laugh

                    Edit :

                    Jason, I looked a 3 different installations of MODx and didn’t find site_sessionname in the modx_system_settings...

                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 23879
                      • 18 Posts
                      PrisonerOfPain Reply #10, 18 years ago
                      Quote from: sottwell at Apr 25, 2006, 08:48 PM

                      Do NOT install the sample site.
                      Why does that option exist when one chooses to upgrade an existing intall?