We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21122
    • 153 Posts
    Hi guys and girls,

    Looks like I’m going to need to port a static site into MODx Revolution. I’ve been given FTP details, and everything looks fine. The thing is, I’m curious of the best way to install MODx, and then work on the site without screwing up the curernt, static site.

    Is there a nice way to install MODx alongside the static site, put the work into the transfer of the site, then swap them over?

    Thanks
      • 21122
      • 153 Posts
      Ok, let me modify the question a little, am I able to rename the index file in MODx, and use that for development? So I can leave index.php (which is being used for the static site) and work on index1.php until the new MODx-ified site is finished?

      Thanks
        • 28121
        • 107 Posts
        Hi Neil

        Good question. A lot of people install Modx locally on their PC and then move the files to the live server.
        I prefer to work on it in a ’live’ environment and usually install it in a subfolder on the live server.
        Usually mytestdomain.com/modx/
        etc

        Then, when I want to go live, these are the steps I do

        1. Backup everything (live site and Modx test sie)
        2. Move all Modx files from subfolder to root

        Now, I can’t recall 100% but I think you can actually change step 2 for following

        3. make a new install of ModX on the root. Obviously, this will overwrite your current site.
        Change your necessary config files to the one with the proper database settings and paths etc
        Run setup

        My memory of step 3 is probably a little off but if you search the forums, it’s an FAQ
          • 8609
          • 607 Posts
          The other option, which is the one I tend to prefer, is to set up MODx in a subdomain of your current site. So say your current site is http://mycurrentsite.com then you can just create a subdomain off of that, say http://dev.mycurrentdomain.com. Install MODx in that subdomain, hide it from the search bots using a meta robots tag so it doesn’t get indexed, and work on your new build there there. This way you’re building within the same environment where your site will finally sit, and you won’t need to shift databases. Then when your MODx site is ready, all you have to do is shift the files over from your dev folder to the site root, change paths, edit your htacccess file if needed, and you should be ready to roll. Some people recommend running the MODx installer again in upgrade mode once you move your site as this will set all the paths correctly.

          The biggest thing, whatever route you take, is to make sure you have a nice solid backup of your current static site and one of your MODx site and database, just in case of anything.

          Hope this helps
            • 28121
            • 107 Posts
            Thats a nice approach. Hadn’t thought of the sub domain route.

            What app do you use to move the files?
              • 21122
              • 153 Posts
              Quote from: einsteinsboi at Jan 24, 2011, 10:45 AM

              Hope this helps

              Of course it does! Thanks Mary. It’s actually the technique I used the last time I was in this situation. The thing is, I don’t have access to the domain host, so it gets tough to keep going back to a client (who may not even know what a sub domain is!) to request one.

              I’m going to go with the folder option for now, and transfer it when the time comes.

              Thanks for all the help!