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

    It’s almost that time... when weeks of hard work and head-scratching have (almost) finally come to an end, and that seedling that has been tenderly nurtured and, until now, only existed only in localhost-land will venture out into the big wide open internet. Hopefully.

    I’ve got an account with Nethosted, after scouring the net for recommendations as to a suitable hosting company, and begun fumbling around try to botch together a migration from my development maachine to their servers. This is the first time I’ve moved anything to a server other thn HTML and CSS, so I know pretty much zilch.

    It seems there are two ways to do this, the first is to follow what most instructions recommend and zip everything up and move it over in one chunk, then updating the relevant paths etc... The second way is to use Nethosted’s native Modx installer, have all the paths already configured and then try to shove my database into it all, somehow. The second of which I’ve tried with about 10% success.

    Can anyone offer me some sage words and reassuring advice as to which method should be the best and least painful approach? I’m moving Revo 2.1.1 from a WAMP environment to a linux server, if that affects anything at all.

    All help and any suggestions are completely and utterly welcome.

    Thanks in advance.
    Chris
      • 26681 MODX Staff
      • 123 Posts
      Hi Chris,

      I’m far from the expert on this, but I have moved a few MODX sites around so here goes nuthin’ tongue

      Quote from: chr.s at Jun 08, 2011, 04:10 PM

      The second way is to use Nethosted’s native Modx installer, have all the paths already configured and then try to shove my database into it all, somehow.

      The database thing and phpMyAdmin confused me at first too, but it’s actually simpler than it seems. Pretty much everything that you do in MODX (create resources, edit resources, add text content, links, snippets, chunks, etc) is stored in your MODX database (via mysql). So if you configure your "fresh" install of MODX to connect to your existing DB, everything should be re-created in the fresh install, with the exception of assets such as images, pdf files, etc.

      Here’s how I would do it:

      1. Create a new database in your Nethosted account using cPanel » MySql Databases. (I’m assuming it’s a cPanel account and you’ve created DBs before wink
      2. Export you DB tables from your local, development DB into a .sql file (if you haven’t already)
      3. On the Nethosted account, go to cPanel » phpMyAdmin and choose your new DB. Then Import your .sql file.
      4. Goto cPanel » File Manager and upload all your assets, mirroring the folder structure from your local development environment. (Your images folder, css, js, etc.)
      5. Upload MODX package to the Nethosted server, or if they auto-installed MODX for you, upload just the "setup" folder into the root directory.
      6. Run setup like you normally would, and when it comes time to connect the DB, enter the name of the DB where you imported your .sql file. (I’m assuming you’ve setup a DB user, etc - enter that all into MODX Setup).
      7. MODX Setup should take you the rest of the way - just follow the on-screen instructions.

      Biggest hint: DON’T WORRY TOO MUCH. As long as you have your site working properly locally, and have it backed up, it would be very very hard to cause damage doing this because you’re just uploading to and messing around with a new install that isn’t live yet. You can always wipe everything on the remote server and start over.

      If any of my assumptions above are wrong, or you need more in-depth help, just reply to this topic or contact me through http://sepiariver.com

      Best of luck...

      P.S. if you do message or reply to me and I don’t get back to you right away, it’s because my wife’s at work today and I’m on kid duty. I’ll get back to you tonight or tomorrow. There’s also lots of other helpful (and more qualified) people in these forums that may jump in wink Cheers!
        [sepiariver.com] (https://sepiariver.com/)
        • 22840
        • 1,572 Posts
        Nethosted are pretty good at support but I don’t know if their versions of MODX are up to date.

        The best thing to do is follow http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server and see how you get on.
          • 5143
          • 116 Posts
          Thanks both for getting back.

          Paulp, you’re absolutely right - their support has been great so far, and thnakfully their Modx installers are bang up to date.

          Sepiariver, thanks so much for this - I’ll give it a go first thing tomorrow morning - it’s been a long day and I’ll only do somehing stupid if I attempt anything now.

          To be continued...
            • 5143
            • 116 Posts
            So here’s what I’ve done so far:

            I decided to follow http://rtfm.modx.com/display/revolution20/Moving+Your+Site+to+a+New+Server, but first note down all of the necessary paths that the native Nethosted Modx install generates. I figured that once I’d moved over my localhost Modx directory, I’d simply copy these back over the relevant lines of code.

            All seemed to go well, I then imported my database following Sepiariver’s first few steps and then altered the first few lines of core/config/config.inc.php to point to my database.

            When I go to www.mysite.com/manager I get the log-in page pop up as expected, but it’s telling me that "That account could not be located. Check the username and re-type the password to try again."
            Also, when I simply try and view www.mysite.com I get a 404 Page Not Found.


            Ok, that turned out to be a MySql user issue, but now only the front page of the site loads (albeit without any CSS) but none of the links work. And when I try and log into the manager, the GUI fails to load, meaning a lot of the functionality isn’t working either undecided

            At last! I’m almost live - one overlooked issue was having moved the site from a subfolder to the root directory. Now time to try and get the gallery plugin to work.
              • 30075
              • 0 Posts
              Quote from: chr.s at Jun 09, 2011, 06:16 AM



              When I go to www.mysite.com/manager I get the log-in page pop up as expected, but it’s telling me that "That account could not be located. Check the username and re-type the password to try again."
              Also, when I simply try and view www.mysite.com I get a 404 Page Not Found.


              Ok, that turned out to be a MySql user issue, but now only the front page of the site loads (albeit without any CSS) but none of the links work. And when I try and log into the manager, the GUI fails to load, meaning a lot of the functionality isn’t working either undecided


              I have the same problem (account could not be located) after an modx upgrade. Could you please tell me how you solved that MySql issue?
              Thanks!