Forums / Installing on a Linux/Unix Server / Publishing Changes from Test site to live site

Publishing Changes from Test site to live site

Locked

Started by mygreygoose on 18 Jun 2007, 11:30 PM · Views: 4,510

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
18 Jun 2007, 11:30 PM
#1
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

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.

19 Jun 2007, 2:17 AM
#2
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

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

19 Jun 2007, 12:35 PM
#3
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

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?
19 Jun 2007, 7:18 PM
#4
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Publishing Changes from Test site to live site

MyGreyGoose:

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).

MyGreyGoose:

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

MyGreyGoose:

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.

MyGreyGoose:

Upload any changed files BUT NEVER the configure files:[LIST]

Correct

MyGreyGoose:

(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).

MyGreyGoose:

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

19 Jun 2007, 8:50 PM
#5
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Publishing Changes from Test site to live site

MyGreyGoose:

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.

20 Jun 2007, 7:01 PM
#6
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

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.

20 Jun 2007, 10:11 PM
#7
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Publishing Changes from Test site to live site

MyGreyGoose:

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.

MyGreyGoose:

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?

MyGreyGoose:

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.

MyGreyGoose:

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

21 Jun 2007, 11:09 PM
#8
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

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