We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42432
    • 2 Posts
    Dear all,

    In Evolution, I always made a site in a subfolder, i.e. "example.com/modx". When development was ready, and I wanted to put the site into production, I moved all content from the "modx" folder to the root folder and changed the option "modx.site_base_url" (or something like that) and tada... the site example.com is in production.

    Not so with Revolution, unfortunately.

    I tried it, but can't find modx.site_base_url anywhere. Now, images are missing when I access example.com with a browser. Moving everything back to example.com/modx and everything looks fine.

    Does anyone have a hint or solution for me? That would be great!


    TIA,


    Maarten
    • You will need to install Revo into the root folder.

      Follow the instructions here (exactly, especially the config file changes noted about halfway down the page):

      http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 42432
        • 2 Posts
        Thanks, Frogabog, for your quick and helpful answer!

        If moving the site from a subfolder is such a pain, what is the best practice with Revolution to build a development site? I mean, how can I build a site at example.com, where visitors can't see the site in development, but the customer and I can?



        Maarten
        • That depends on if you have an existing site that needs to continue working while you develop the Revo site. If not, you can set the site to be offline, so it will only display a message or a specified page. Logged-in Manger users can still access the entire site.
            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
          • I wouldn't call it best practice, but assuming that it's a brand new domain, one way to do it is to upload an index.html file, make sure FURL's are off, and develop in the root along side it. You can do this with a static site as well, as long as FURL's are off or you don't duplicate any existing html filenames (aliases in MODX).

            Or, develop in the subfolder and get used to moving the site this way. It's not really that difficult, nor does it really take very long after doing it a few times so you know the process well.




              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
            • I would suggest you duplicate the context and have one for production and another for development, then just copy over the resources once development is done to the production domain.

              If there's too many resources to copy over you can also change the dev domain to respond to the production domain and vice versa.
                Benjamin Marte
                Interactive Media Developer
                Follow Me on Twitter | Visit my site | Learn MODX
                • 10076
                • 1,024 Posts
                I too have those problems when comparing with EVO. Allways a hassle to move a REVO site. Be it from root/folder to root/ or from a local site. Following the instructions from above (or below???) link for me never works. So at the moment I just setup a new REVO install. Download and install all packages that are used in the staging site, export the tables that have "site content, site snippets categories etc" and import those to the new site. That, for me, is the easiest way. I do miss the ease of moving MODx Evolution sites. Time someone created some smart export tool??
                  • 22840
                  • 1,572 Posts
                  I simply copy all files and database to the live domain, edit the config file and re run setup in upgrade mode.
                    • 40389
                    • 8 Posts
                    I struggled with the same issue - setting up a modx site on the same domain as the conventional site. I am using the following method now.

                    1) Install modx completely in the root of your domain - like any normal installation. If your old root start file is index.php, make sure to rename that before you start the installation, but a lot of times, this will be index.htm(l) and it can be left unchanged.
                    2) Make sure you don't use friendly URLS at this time. However, if you plan on using friendly URLS in the future, you can set it up now (including adjusting the .htaccess file), test it and have it ready for future use (I am assuming you are doing this sometime deep in the night - until step 4 is taken care of the old site will not work).
                    3) go into the manager and go to system settings. Set "Request Controller Filename" to anything-you-like.php, like secret-test.php and make sure that "Use Friendly URLs" is set to No.
                    5) rename index.php to anything-you-like.php, like secrest-test.php
                    6) rename, if necessary, the original index file from the old site to its old name (index.php).

                    At this point, your old site is working. The new site is accessed with http://www.yoursite.com/secret-test.php. The wayfinder menu system works, you can access paged directly by adding "?id=1" (use any valid resource number) to the URL. When it is time to set the new modx site live, it's done in less than 30 seconds without any transfer of files or databases. And if something is not quite right, you can go back to the old site - also in a matter of seconds.

                    I see only ONE drawback: if someone knows or guesses the filename that starts the new website (secret-test.php), your new site is not so secret anymore. But with a cleverly chosen name that should not be the biggest issue for most of your clients.

                    Although I have tested the above, I just recently came up with this idea, so if you find any drawbacks, please let me know.
                    Also, perhaps you are already aware of this, if you use the MODX cloud, you will never have to deal with these issues anymore. It comes at a price, but I have tested it and it saves you from a lot of hassles and it includes extremely easy version updates of your installation. [ed. note: joostmineur last edited this post 11 years, 3 months ago.]
                      • 39333
                      • 151 Posts
                      I do the same as Paulp, and also for images in your src use:

                      "[[++site_url]]assets/images/myimage.jpg"


                      That way where ever you install the site they will still show up.

                      For background images in the CSS I don't have a problem using short links, but for images called directly in the html this is what works best for me especially if I have to do migrations with the site.
                        MODX...the Zen of CMS
                        "Bight off more than you can chew and keep right on chewing."