We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10727
    • 11 Posts
    I’ve been asked to build a new site for a company that already has a website at bluehost. Since they already have a site, I don’t want to install modx in the main directory do I? wouldn’t this overwrite the current site?

    I’m thinking of creating a directory like www.currentsite.com/modx and installing it and building it there... but my question is, 1.) is this a good or bad idea? and 2.) once it’s ready to go live, how to I move the modx site to the www.currentsite.com directory if I installed it in the www.currentsite.com/modx directory? Thanks for any insight!!!
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      You could create a subdomain, e.g. modx.currentsite.com/

      In the bluehost cpanel, you would add a sub-domain that would get mapped to a folder inside your public_html, e.g. ~/public_html/modx/

      That means the site would live in the same place as if you had installed it to a subdirectory, but it would open up an easier domain for testing the site. Once they were ready to flip the switch, you could either move the contents of the modx/ directory into the main one, or you could update the .htaccess file in the main directory to route requests to the modx/ subdirectory.

      Hope that helps.
        • 10727
        • 11 Posts
        You could create a subdomain, e.g. modx.currentsite.com/

        In the bluehost cpanel, you would add a sub-domain that would get mapped to a folder inside your public_html, e.g. ~/public_html/modx/

        That means the site would live in the same place as if you had installed it to a subdirectory, but it would open up an easier domain for testing the site. Once they were ready to flip the switch, you could either move the contents of the modx/ directory into the main one, or you could update the .htaccess file in the main directory to route requests to the modx/ subdirectory.

        Hope that helps.

        If I put it in the currentsite.com/modx folder could I still do this? The only reason I ask, is I don’t think I should mess around in the main domain at all just yet. Thanks a TON for the fast response!!!
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          Sure, np.

          The thing with Bluehost is that the primary domain will contain all others... you can’t map it to some other place, unfortunately. E.g. I have my primary domain’s docroot in ~/public_html/ folder. All my sub-domains or add-on domains have their doc roots inside of ~/public_html, e.g.


          • ~/public_html/sub-domain1/
          • ~/public_html/sub-domain2/
          • ~/public_html/add-on-domain1/
          • ~/public_html/add-on-domain2/

          The downside is that means your can access your sub- and add-on-domains via their doc roots from the primary domain (my-primary-domain.com/sub-domain1/ ) etc. but overall it’s a system that’s quite workable. If you *really* wanted to restrict access to that sub-folder, you could put some redirect rules in the .htaccess folder, but that’s probably over-the-top.