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

    I am a little stuck.

    I need to move an existing modx website from one web server to another (eg its the same website but I am setting it up on a new web server) and don’t know how to do it.

    (The site currently uses MOdx version 0.9.6.2 and I will upgrade once I get the content / database working.)

    I have searched the forums but haven’t found a solution that makes sense to me.

    I also found this page but I found it hard to follow as I use cPanel for setting up mysql etc.
    http://www.codeistry.com/help/uploading-downloading-and-backing-up-modx-sites


    So this may sound like a silly question, but when moving a modx site to another server, do I have to run the install package again if its the same version of modx? Or is it just a matter of uploading the site files and the mysql database? If so, what am I missing?

    I tried doing it without uploading the install folder and manually editing the config.inc.php file but the modx login page shows the following 4 errors and I don’t know what they mean:

    Warning: fopen(/home/duser/public_html/manager/media/style//login.html) [function.fopen]: failed to open stream: No such file or directory in /home/duser/public_html/manager/includes/accesscontrol.inc.php on line 129
    
    Warning: filesize() [function.filesize]: stat failed for /home/duser/public_html/manager/media/style//login.html in /home/duser/public_html/manager/includes/accesscontrol.inc.php on line 130
    
    Warning: fread(): supplied argument is not a valid stream resource in /home/duser/public_html/manager/includes/accesscontrol.inc.php on line 130
    
    Warning: fclose(): supplied argument is not a valid stream resource in /home/duser/public_html/manager/includes/accesscontrol.inc.php on line 131


    Any ideas?

    Thank you kindly in advance
      Web design Adelaide
      http://gocreate.com.au
      • 3749
      • 24,544 Posts
      This will be a better guide:
      http://wiki.modxcms.com/index.php/Moving_Site_To_Another_Location


      In theory, you don’t have to run install at the new site if you’ve done everything you need to. In practice, it’s a good idea and almost never does any harm as long as you choose "Upgrade" and uncheck the add-ons and sample site.

      It looks like you might be using mod_rewrite in the .htaccess file in the MODx root folder (there’s an extra backslash in the file paths). Try renaming the file to ht.access for now.
        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
        • 21417
        • 486 Posts
        Thanks BobRay.

        I think I need to clarify a bit.

        I am building a website for an organisation that is 99% identical to a modx website I built for its sister organisation in another state.

        There will only be a few minor text changes.

        But the sites do have different domain names.

        I had a look at that wiki document first but that appears to apply from a local copy to a web server - whereas I am going from one web server on one domain to another web server on another domain.

        I wish there was a tools / restore system in the manager where you can easily change the mysql database like there is a tools / backup system - seems to be all a one way flow at the moment.

        Anyway I am rambling...

        I installed modx on the new server - whats the best way now to get it linking to the database with all the info from the sister site?



          Web design Adelaide
          http://gocreate.com.au
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I had a look at that wiki document first but that appears to apply from a local copy to a web server - whereas I am going from one web server on one domain to another web server on another domain.
          There is no difference. They are all web servers, just that the one on "localhost" is hosted on the local machine, by long convention called "localhost" for obvious reasons. For example, MySQL connections by a PHP script to a MySQL database on the same host will use "localhost" as the host name. Simply replace references to "localhost" with "firstdomain.com" in your mind.

          The main issues with such a move is the server type (Linux -> Windows or vice verse) and MySQL compatibility, both in versions and in default character set and collations. If your site is only in English, those last two aren’t so much a problem.

            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
            • 21417
            • 486 Posts
            Thanks for clearing that up sottwell.

            It still sounds a little double dutch to me!!

            The server type is the same but anyway I have found someone to do the transfer for me for a small fee.

            Thanks again.
              Web design Adelaide
              http://gocreate.com.au