Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Publishing Changes from Test site to live site

    I've seen a few tutorials like this one explaining how to move a store from a test site to a live site. But all these steps seem to be focused on a one time setup but are a lot of work if I'm making frequent changes over time.

    Is there a way to make changes on a test site, say on my PC (I've got a local test site already set up) and then publish only the files that have changed?

    For example, I suppose if I only made a change to C:\xampp\htdocs\zencart\includes\templates\custom\css\stylsheet.css, I could just FTP that to the appropriate location on the live site.

    But what if I made a LOT OF CHANGES? And what if I make changes through the admin panel? (those settings are saved in the mysql db, right?). How would I upload those changes and avoid overwriting any new customers/orders that came in while I was working on the test site?

    So, maybe what I'm asking simply, is there a way to upload just admin/structural changes and not affect the customer/order information that comes in. Something that would allow for a lot of development on a local test site and then frequent updates to the live production server.

  2. #2
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Publishing Changes from Test site to live site

    As long as the directory structure on your test site is identical to that on the live site, you should be able to make as many or as little changes as you want, upload them to the respective directory on the live site, and that's it.

    As long as your "test site" is not directly connected to the live DB, and you are not adding, editing, deleting records through it, then order information will not be affected at all.

    The only other thing to be aware of is that the configuration files (under catalog and admin) will need to reflect your directory locations on the test server, and then the directory structure on the live server (more than likely different from the test server).
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  3. #3
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Publishing Changes from Test site to live site

    That definitely sounds encouraging! So, I may have been wrong to assume this, but I had thought that when I make changes through the admin panel, those changes/settings get stored in mysql. If not, I guess they get stored in changes to the site files?

    If the above is correct, let me see if I have the whole thing straight. In order to publish from the test server to the live server, I would:
    1. Make sure the directory structure is identical
    2. Make sure the test site is not connected to the live db
    3. Upload any changed files BUT NEVER the configure files:
      • \includes\configure.php
      • \admin\includes\configure.php
      • (is that right? any others?)
    On a different, but related note, is there a way to easily keep track of files changed locally on the test site and then publish (upload/ftp) just the changed files?

  4. #4
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Publishing Changes from Test site to live site

    Quote Originally Posted by MyGreyGoose View Post
    That definitely sounds encouraging! So, I may have been wrong to assume this, but I had thought that when I make changes through the admin panel, those changes/settings get stored in mysql. If not, I guess they get stored in changes to the site files?
    No, this is incorrect. The changes made through the admin are saved to the database (mysql).


    Quote Originally Posted by MyGreyGoose View Post
    If the above is correct, let me see if I have the whole thing straight. In order to publish from the test server to the live server, I would:
    Make sure the directory structure is identical
    Correct

    Quote Originally Posted by MyGreyGoose View Post
    Make sure the test site is not connected to the live db
    Correct (unless you want to make changes to the database on the live site of course.

    Quote Originally Posted by MyGreyGoose View Post
    Upload any changed files BUT NEVER the configure files:[LIST]
    Correct

    Quote Originally Posted by MyGreyGoose View Post
    (is that right? any others?)
    If you have any third party add-ons of course you'll want to upload those as well. The only reason I say not to upload the config files is because I am assuming they are pointing to a "test database" and if you uploaded them, you would break the connection to the live db (by overwriting it).

    Quote Originally Posted by MyGreyGoose View Post
    On a different, but related note, is there a way to easily keep track of files changed locally on the test site and then publish (upload/ftp) just the changed files?
    There are a number of programs out there I am sure that would help you setup "projects". I use a text editor that (Homesite) that enables me to keep track of changed files etc...

    Or, you could simply make a change, see if it looks good on the test server, and then upload that file to the live server.

    I develop on a test server at times. Here is how I do it.

    1) Install zen on both servers (test and production).
    2) Make alterations to the test server FILES as needed, view results, then upload to production server when satisfied.

    That's it. :)

    There really is nothing to it. If you are thinking of making changes that affect the "inner workings" (controlled through the database), then there is no reason you can't make those on the live site (and bypass it totally on the test one).

    I use my test server to simply update FILES. That's it.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  5. #5
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,230
    Plugin Contributions
    0

    Default Re: Publishing Changes from Test site to live site

    Quote Originally Posted by MyGreyGoose View Post
    On a different, but related note, is there a way to easily keep track of files changed locally on the test site and then publish (upload/ftp) just the changed files?
    You should be able to find an FTP client that has a 'synchronise' option - it will check the date/time on each file (local vs server) and upload only the files changed (locally) since your last file upload.

    Can't recommend any FTP programs since I don't use a PC, but there should be some available if you Google.

  6. #6
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Publishing Changes from Test site to live site

    Ok, I think I'm getting the hang of it. First of all, it's much simpler than what the tutorials make it out to be. I think I'll follow the same approach basically as econcepts.

    1) I'll ftp FILES from the test to live server if I've made changes
    2) IF I've made changes through the admin, I'll export the DB from the test server and import it into the live server. BUT, once my site goes live, I'll probably make all db/admin changes through the admin on the live server. And if necessary for my local test site, I'll export the live db and import it into my local test db.

    That's it!?! Questions:

    A) The tutorial also said I
    may POSSIBLY need to also synchronize your cache settings between the configure.php and database. You can do it automatically with the Fix-Cache-Key tool.
    I didn't do that, and I couldn't tell any differences. Am I normally pretty safe not doing this step?


    B) The way I'm FTPing (when I FTP everything) is that I use Filezilla set to Overwrite if New and I use 10 connections. This takes a long time for a few reasons 1) there's like 10MB & 1000s of files, 2) I use a SFTP connection, 3) some of the files upload even if there weren't any changes, I suppose b/c there are minute differences in the server clocks. My question: is there a faster way to do this? E.g., are there folders and files (Microsoft) that are totally unnecessary and I can delete from both servers? Are my ftp settings correct?

    BTW, when I do it this way, it does not upload the 2 configure files (I'm assuming b/c they are Read Only) which means I don't have to handle those separately.

    C) Two of you have mentioned programs that can help in either keeping track of files that change through a project or through ftp that synchronizes. I tried a few programs like PSpad and UltraEdit & UltraCompare, but I was humbled in my attempt to figure out how to use them to keep track of changed files (and then easily SFTP them up). Is there something I should be looking for in how to set these up for easy developing then uploading?

    As for FTP synchronizing, I couldn't find any FTP client that does synchronization and SFTP (at least that I could tell). I'm guessing that my Filezilla "Overwrite if New" setting will get me by (but let me know if you have any suggestions).

    Sorry for all the questions... but I spent forever trying to sort this out in my head and looking for software that would simplify all of this for me.

  7. #7
    Join Date
    Dec 2005
    Posts
    1,509
    Plugin Contributions
    6

    Default Re: Publishing Changes from Test site to live site

    Quote Originally Posted by MyGreyGoose View Post
    A) The tutorial also said I I didn't do that, and I couldn't tell any differences. Am I normally pretty safe not doing this step?
    Technically you should, but I have never had a problem NOT doing it. You'll know you have to do it if you made changes, and it looks like "they have not applied" or you get errors about an older file setting you know has since been changed.

    Quote Originally Posted by MyGreyGoose View Post
    B) The way I'm FTPing (when I FTP everything) is that I use Filezilla set to Overwrite if New and I use 10 connections. This takes a long time for a few reasons 1) there's like 10MB & 1000s of files, 2) I use a SFTP connection, 3) some of the files upload even if there weren't any changes, I suppose b/c there are minute differences in the server clocks. My question: is there a faster way to do this? E.g., are there folders and files (Microsoft) that are totally unnecessary and I can delete from both servers? Are my ftp settings correct?
    Do you have to upload ALL files (or try)? I only upload what I made alterations to ... it is a lot faster. Chances are (I think), you won't be making a ton of "site wide changes" without testing them on the live server at some point right?

    Quote Originally Posted by MyGreyGoose View Post
    As for FTP synchronizing, I couldn't find any FTP client that does synchronization and SFTP (at least that I could tell). I'm guessing that my Filezilla "Overwrite if New" setting will get me by (but let me know if you have any suggestions).
    Filezilla is a decent program.

    Quote Originally Posted by MyGreyGoose View Post
    Sorry for all the questions... but I spent forever trying to sort this out in my head and looking for software that would simplify all of this for me.
    Ya know, I think you may be making it out to be harder than it is. I develop on test servers all the time and have never gone through all the steps you are? I simply make my file alterations on the test server, then upload to the production one. I upload files as I know "they work" and I am satisfied. That way I know I have the latest version on both servers.
    Eric
    20 Ways to Increase Sales Using Zen Cart
    Zen Cart contribs: Simple Google Analytics, Export Shipping Information

  8. #8
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Publishing Changes from Test site to live site

    Yep, I probably was making it much tougher than I had to. It's just that the tutorial had 8 steps, so I got confused. I hear what you're saying... just upload the files as I change and test them. The reason I was mass uploading everything is that I'm just getting started customizing and I lost track of the dozens of files I changed.

    Thanks a lot Eric. I think I have the hang of it now!

    Joe

 

 

Similar Threads

  1. v151 Losing customer info when moving database from test site to live site
    By FunkyPapa in forum General Questions
    Replies: 3
    Last Post: 7 Oct 2013, 01:11 PM
  2. v139h Changes in Test Site affect the Live Site
    By budy in forum General Questions
    Replies: 4
    Last Post: 20 Jan 2013, 06:59 PM
  3. Replies: 10
    Last Post: 4 Mar 2011, 01:05 AM
  4. Site in test. Move to live.
    By distinctivedog in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 20 Aug 2010, 06:35 AM
  5. Creating a Test site that mirrors my live site
    By mw4kids in forum General Questions
    Replies: 17
    Last Post: 3 Feb 2009, 02:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR