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

    This is my first question in the forum, so I hope it is the right place I have choosen. I am totally new to modx, but manages to make a Site, I have tried to move from my wamp server to the remote server today. I followed the toturial "Moving Site To Another Location" and everything went fine, until I reached point 6. After I changed permissions on the directories and php-files, I could no longer access the modx manager, see for yourself please: www.moustache.dk, now I get a lot of error messages.
    I don’t understand the next point of the toturial:

    "7.Dump the local DB contents (use Tools -> Backup in the MODx Manager, or any MySQL client such as phpMyAdmin) and then import the SQL dump in the target DB on the remote server (most hosting environments use phpMyAdmin for this). You will probably want to empty any log tables (Reports -> System Events and Reports -> Manager Actions) before backing them up, or else you’ll have rows and rows of log data useless to your new server."

    I am able to log in at the phpmyadmin on the remote servers , but I am not sure what file to import or dump. Hope anybody understand my english and are able to help me with this.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Get what is called a "database dump" of your local database; you can use the Tools->Backup utility in your local Manager. This will give you a fairly large .sql file.

      Create the database for the remote site. Make sure that the new database uses the same character set and default collation as your local database.

      Using phpMyAdmin, go to "Import" and select your .sql file to import. It will load the .sql file, creating all the tables and data from your local site.

        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
        • 11884
        • 3 Posts
        Okay I tried that and now I got an error-message like this:

        Fejl
        SQL-forespørgsel:

        #
        # Moustache Database Dump
        #
        #
        # Host: localhost
        # Generation Time: Aug 31, 2010 am31 07:13
        # Server version: 5.1.36-community-log
        # PHP Version: 5.3.0
        # Database : `modx`
        #
        # --------------------------------------------------------
        #
        # Table structure for table `modx_active_users`
        #
        CREATE TABLE `modx_active_users` (

        `internalKey` int( 9 ) NOT NULL DEFAULT ’0’,
        `username` varchar( 50 ) NOT NULL DEFAULT ’’,
        `lasthit` int( 20 ) NOT NULL DEFAULT ’0’,
        `id` int( 10 ) DEFAULT NULL ,
        `action` varchar( 10 ) NOT NULL DEFAULT ’’,
        `ip` varchar( 20 ) NOT NULL DEFAULT ’’,
        PRIMARY KEY ( `internalKey` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1 COMMENT = ’Contains data about active users.’;



        MySQL returnerede:

        #1050 - Table ’modx_active_users’ already exists

        I think I got something wrong in the first steps. I will try to explain:

        1. First I made an install on the remote server with same installation package as I used on my wamp.

        2. Under the installation the database name was predefined as moustache_dk (with another name and password than on my local database, here the name is modx), this I couldn’t change.

        3. So as I understood, I changed the ht.access file to .htaccess and made also a .htaccess.local-file. I now think it is here I got confused.I have attached the 3 htacces files I have on my remote server. The file ht.access is the same as the file I now have om my local wamp, (I had to change this back to be able to login on my local modx manager, when I what to save the sql-backup)

        4. Then I changed the config.inc files 2 lines:

        $database_user = ’moustace_dk’;
        $database_password = ’remote db password’;

        and made an config.local.inc-file with the original lines from the original config.inc file om my wamp modxcms

        5. Then I upload the files and directories as described in point 5. of the toturial

        6. Last I changed the permissions on the files an directories as described under point 6.

        I hope my explanation can give someone a hint about where I got lost. I really appreciate the quick and nice answer on my first post here. Thansk at lot, so far smiley
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You need to either remove the tables that were created when you did the new install, or when you get the backup of your existing database make sure to select the "drop table" option.

          It’s actually a better idea to simply move the original site, run the original version’s installer in upgrade mode to get everything sorted out, then do the full upgrade.
            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
            • 11884
            • 3 Posts
            Hi sottwell

            Thanks, and again: "What a nice and simple answer! Next time, when I have redesigned my own site in modx smiley, I get no troubles with the moving process - I now see that it isn’t so complicated, as written.
            Actually I was so impatient yesterday evening (to clear my brain as I started a new job today), that I at last began copy/paste on a new installation. It isn’t a big website, but I was very annoyed not understanding the right procedure. I hope I do now, so thank you very much for your time and effort.