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

    I have a site on my server up and running.

    If I make design changes to my local site (wamp), add pages, functionality, etc. how do I move those updates to the server?

    I’ve read through a number of forum entries on how to backup or move the entire site, but is there a tutorial or instructions for moving updates from the staging server to the production server or the other way?

    Do I really need to replace the entire site with a backup?

    Thank you!

    Terry
      www.terrybarthdesign.com
      • 27708 MODX Staff
      • 2,502 Posts
      If you’ve made changes to the db you will have to at least do the SQL export local to import remote. I’d also copy the assets folder just to be safe. Most FTP apps can handle only copying new files. Make sure the times are synched on the server and local. Keep in mind that the db on the server will not be integrated but overwritten.

      Pre 097 versions of MODx don’t do synching for content easily and require planning and careful backups of data.

      Cheers,

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 29525
        • 388 Posts
        Jay

        Thank you. I suspected all I had to do was export / import the SQL and move the new assets. Good. I’m using 9.6.1.p2

        Now a couple of questions.

        Why is the time sync important? Does this mean the server time and the pc clock? If they’re not what do I do? What needs to be synced? File date/time stamps?

        I presume this works in both directions? The reason I posted this question is I exported my sql DB from the server and tried to import it into the local site, but I got the following error message. I thought perhaps there might be something more involved. I used the SQL DB export/import when I moved the local site to the server, but that was to a new DB not an existing one. Any thoughts?

        Error
        
        SQL query:
        
        --
        -- Database: `terrybar_terrybarthdesign`
        --
        -- --------------------------------------------------------
        --
        -- Table structure for table `terrybarthdesignactive_users`
        --
        CREATE TABLE `terrybarthdesignactive_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 said: Documentation
        #1050 - Table 'terrybarthdesignactive_users' already exists 


        Thank you for your help!

        Terry
          www.terrybarthdesign.com
          • 27708 MODX Staff
          • 2,502 Posts
          Re the time synch: This is only necessary if you use the Upload If Newer feature of many FTP apps. Most FTP apps will let you save a time offset for the server profile.

          Re: If you are using phpMyAdmin you can just dump the tables. AS yuo can see the SQL statement is trying to create the table and create the rows columns as well. This won’t work. I’d use phpMyAdmin’s dump to remove the tables and let the exported file to recreate the tables. It is also possible to make export with the dump command built in from the Export pane.
            Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
            • 29525
            • 388 Posts
            Smashingred

            Thanks for the FTP clarification. Got it. Thank you.

            I could use a short SQL / MYphpADmin lesson here. Sorry to be such a noob. I really do try to research my questions before I post. . .

            I’m trying to update my local server (wamp) with updates made to my server copy.

            When I export the local DB using myphpadmin, I don’t see (or recognize) an option to remove the tables. If go to the structure view and select all the tables to delete, I’m warned that I’m deleting the entire database in which case there’s nothing to import my server file into. (I tried and promptly restored the entire directory from backup).

            As I googled around for this I read about creating an export from the source with a drop command built in? Made a few attempts at that, no luck. I also noticed there is an export type. I selected ’replace’. no effect.

            I’m using phpMyAdmin - 2.10.1 (WAMP).

            So, how I do remove the tables so I an import my DB?

            Thank you!
              www.terrybarthdesign.com
              • 3749
              • 24,544 Posts
              There should be a checkbox marked "Add DROP TABLE" or something similar on the PhpMyAdmin export screen but maybe it’s missing on your version.

              In that case, you need to drop the tables in the receiving DB before doing the import. You should be able to get a list of all the tables in the DB (by selecting the "Structure" tab).

              Each table should have a checkbox to the left. If you select those and then look to the bottom of the screen, you should see "With Selected," a drop-down menu of stuff to do with the selected tables. Drop should be on the list. Select it and click on the "Go" button at the bottom right.

              Bob
                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
                • 29525
                • 388 Posts
                BobRay

                Thank you! There was indeed an option to Add Drop Table. It was hidden in a pull down vs a check box. I was able to successfully import the DB.

                However, when I try to access the site or the MODx Manager I get an error that says:

                Error while inserting event log into database.


                I haven’t finished downloading the assets folder yet. Some of the files produce an access denied error so I’ll have to do it one by one. . . ugh. However, I wouldn’t this is related to the database error.

                Clues?

                Terry
                  www.terrybarthdesign.com
                  • 3749
                  • 24,544 Posts
                  I’m not familiar with that error. Hopefully someone else is.

                  If you look in PhpMyAdmin at the MODx database, is the event log table there (modx_event_log)?
                    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
                    • 29525
                    • 388 Posts
                    BobRay

                    Your good! When I created the export, I did not include the event logs because I understood they would make the file quite large and are not really needed. Did I get that wrong?

                    When I get back to my office I will try this again. I’m guessing this will fix it.

                    Stay tuned!

                    Terry
                      www.terrybarthdesign.com
                      • 29525
                      • 388 Posts

                      Well I exported the entire DB, re-imported and I’m good to go!!

                      Thank you!!
                        www.terrybarthdesign.com