We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3751
    • 5 Posts
    I am working on re-implementing an existing site.

    I started my development in a folder of that site named \modx. Before going live, I’d like to either move everything up one level, or into a differently named folder.

    This is not quite the same as moving from a development server (I know where to find the wiki that explains that process) since the database server doesn’t move. But I would expect that database entries do reference the \modx folder, so I am not sure how to proceed. What is the simplest solution?
      • 3749
      • 24,544 Posts
      The process is pretty much the same as moving to another server except that you can skip the steps where you export and import the DB contents.

      Back up the site first. I would also turn off Friendly URLs and rename .htacces to ht.access before the move if FURLs are turned on.

      Then it’s pretty much just a matter of copying the files and running the install in upgrade mode (be sure to un-check the add-ons and sample site).
        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
        • 3751
        • 5 Posts
        What does "install in upgrade mode" do?

        Does this kill the development version, or are both still active? I don’t really understand how the database is used and don’t want to corrupt the connections.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          All that running the installer in Upgrade mode will do is make sure the database tables are all updated (the structure of the tables not the data; that isn’t touched) and most importantly refreshes the site cache file.

          You know, come to think of it, there is no reason why the update procedure couldn’t determine the correct file paths and URLs for the resource browser and the file manager and update the system_settings table... or does the advanced upgrade already do that?
            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
            • 26931
            • 2,314 Posts
            All that running the installer in Upgrade mode will do is make sure the database tables are all updated

            when i move sites, i actually never run the installer, i just change the settings under configuration afterwards, never had any problems...is there anything i’m missing?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              No, it’s just that sometimes the site cache can be a little off, since it stores a copy of the system_settings table in an array.
                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
                • 3751
                • 5 Posts
                Do you mean moving around within the same site (where the database does not move), or between hosts?

                I just looked around Configuration and did not see anything that referenced the root folder. I feel as if I am missing something obvious. What is it?
                  • 26931
                  • 2,314 Posts
                  No, it’s just that sometimes the site cache can be a little off, since it stores a copy of the system_settings table in an array.

                  ah, okay...thanks

                  Do you mean moving around within the same site (where the database does not move), or between hosts?
                  if your site is in a subdirectory, and you move it to the root you need to change your settings under configuration:
                  File manager -> File Manager Path
                  Interface & Features -> Resource path

                  basically just delete the name of your subdirectory (in your case "modx")

                  + the reference of the subdirectory in your .htaccess-file (if you are using it)

                  clear the MODx-cache

                  if you are moving to anothe host, you have to change the whole path for "File Manager Path" & "Resource path"

                  ...that’s how i do it
                    • 3749
                    • 24,544 Posts
                    Quote from: sharkbait at Aug 07, 2009, 12:16 AM

                    No, it’s just that sometimes the site cache can be a little off, since it stores a copy of the system_settings table in an array.

                    ah, okay...thanks

                    Do you mean moving around within the same site (where the database does not move), or between hosts?
                    if your site is in a subdirectory, and you move it to the root you need to change your settings under configuration:
                    File manager -> File Manager Path
                    Interface & Features -> Resource path

                    basically just delete the name of your subdirectory (in your case "modx")

                    + the reference of the subdirectory in your .htaccess-file (if you are using it)

                    clear the MODx-cache

                    if you are moving to anothe host, you have to change the whole path for "File Manager Path" & "Resource path"

                    ...that’s how i do it

                    I think in most cases, the Upgrade install does all that for you, but I could be wrong.
                      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
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      The Upgrade install doesn’t do anything to the configuration’s settings for file paths and URLs, although there’s no reason why it couldn’t.

                      Another thing to keep in mind if you’re moving from a subfolder into the root folder is to edit your .htaccess file and get rid of the subfolder in the RewriteBase line.
                      RewriteBase /subfolder

                      to
                      RewriteBase /
                        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