We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    I’m trying to transfer my content from my desktop installation to my live server and am getting all sorts of weird results.

    I followed the instructions in the wiki and elsewhere, When look in phpadmin all the content seems to be in the db. However when I login to Modx there’s nothing there.

    Also the first time I tried it, it kept telling me I was using an incorrect id and password. So I ripped everything out and started again. Now at least I can login.

    Any ideas?

    I’ve tried doing this a dozen times now, uninstalling and reinstalling both the modx files and the database, and I either can’t login, or if I can then the data content isn’t showing up in the modx manager.

      Content Creator and Copywriter
      • 18367
      • 834 Posts
      OK,

      after spending a solid day on this I managed to solve it.

      After uninstalling and reinstalling modx a dozen times, importing and dumping data via phpadmin about the same number of times and staring at the config ini file for ages clues began to emerge.

      I noticed that my newly imported files had a different sub prefix. EG [newly imported]_site_content vs [existing]_site_content

      After trying a few edits in phpadmin which worked but would take far too long for the whole db, I wondered: "Where else did I just see a "db prefix" parameter.

      Back to the config file. Sure enough there it was, so I changed it to the new prefix and everything now works.

      Not sure if this is the correct way to do it though.

      Obviously when Modx gets installed a default db prefix is set by the user.

      However, when you export out of a desktop or dev server db, it gives the tables in the file a different prefix.

      So you must remember to change that setting after exporting to a new server.

      I’ve probably come about this butt backwards, so if any more knowledgeable types out there want to comment on how I should have done it, then please do.

      grin

        Content Creator and Copywriter
        • 3749
        • 24,544 Posts
        The default table prefix is modx. If you leave it alone, all installs will match but if you change it, you have to remember to do it again when you move the site.
          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
          • 18367
          • 834 Posts
          Yeh, I understand that Bob (well I do now), but I wasn’t using the default modx prefix to begin with.

          I think my problem was compounded by the fact that my host automatically gives me a a db prefix anyway, before I create any new dbs.

          And of course Modx won’t allow you to install into an existing db.

          What I ended up doing was re-installing Modx into a temporary db, and then going into the config file and re-edit the db connection settings so that it points to the db that has my already uploaded content.

          I’m sure there’s an easier way, but I’m getting good at doing it this way.



            Content Creator and Copywriter