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

    I am trying to move a website from the local WAMP environment I have been working on it to an online server with a web host.

    I was wondering if there was an easier way to do this other than doing a fresh install of MODX on the new server and re-creating all the resources etc. again. i.e. starting from scratch.

    I have been following this guide here:https://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

    But think I may be doing something wrong as the home page will not load. I keep getting "Error 503".

    I am also slightly confused about the part about re-running the set-up file once you've dumped the databased on the new server and edited the configs file since the set-up folder is deleted once the installation is completed.

    Appreciate any help you can provide.

    Thanks,
    Scipio
      • 30585
      • 833 Posts
      Here are quick steps :

      1 - Install MODX on the remote server (Preferably the same version as the one on your WAMP server)
      2 - Upload the following WAMP files and folders to your remote server (Keeping the structure on the remote server):
      -- core/components/
      -- core/packages/
      -- assets/
      -- All other files in the web root except : config.core.php and index.php
      3 - Export your WAMP database and Import it in your remote server
      4 - Rerun the MODX install on the remote server (Repeat step 1), but select upgrade this time.

      There's an article on MODX blog that covers this perfectly.
        A MODx Fanatic
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        For transferring new, relatively small sites, it's hard to beat Vapor.

        Install Vapor from the package manager, then run the vapor/vapor.php script directly from your browser address bar. This will produce a package.zip file in your core/packages/ directory.

        Upload this to the core/packages/ directory of the new installation on the hosting, and install it from the package manager like any other add-on package.

        If you have access to the command line on both servers, you can also use Teleport to extract, then inject a full snapshot. https://github.com/modxcms/teleport/blob/master/README.md
          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
          • 30585
          • 833 Posts
          Vapor is a great tool indeed.
            A MODx Fanatic
            • 51989
            • 2 Posts
            trelgh, sottwell

            Thanks for the help. I went with trelgh's quick steps in the end as Vapor was not working for me for some reason.

            All seems to have gone well but the sytlesheet and images are not loading. I intially thought it might be an issue to do with file permissions but I tried changing this for the ccs stylesheet from 0644 to 0755 but still did not resolve the problem. Have you guys come across a similar problem after migrating a site?

            Will get it touch with the host's support to see if they can help.

            Thanks again,
            Scip
              • 3749
              • 24,544 Posts
              I don't think the host will help. Most likely, it's a path problem in your code, since the rest of the site and the manager is working.

              Maybe you hard-coded the path to the CSS files in the Templates?

              Look at the source of the page in your Browser (Ctrl-u) to see where it's looking for the CSS files, then check your Templates and Chunks for those paths.
                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
                • 30585
                • 833 Posts
                I suspect a missing <base> tag in your templates and a missing .htaccess file in the web root.

                Try adding <base href="[[++site_url]]"> in the head of your template, before the stylesheet and other assets.

                Then rename the ht.access file to .htaccess.

                I'm assuming of course that you haven't tried these steps yet.
                  A MODx Fanatic