Upgrade Best Practices

I was looking for best practice recommendations on upgrading from 1.3.5 to 2.0. I know that we have no instructions on this from CS-Cart dev, but I was thinking about the following scenario and would like feedback on whether or not this is a good plan or if there might be a better option.


  1. Setup a new v2 install on a new public server (not locally).
  2. Setup a new v2 skin.
  3. Import 1.3.5 data for testing
  4. When testing completed, close old store, import old store current data.
  5. Point domain name to new IP address for v2.



    If there is a better way to do this, I’d love to know your thoughts.

This has been my preferred upgrade approach in the past and I will most likely continue using the same routine. However, after you import the data from your 1.3.5 store, you will need need to do the updates to the data so that it conforms to the v2 database schema. Unfortunately, we are still waiting on the database upgrade from the developers but it should be here soon.



Once available, you will most likely be able to simply execute the SQL instructions to transform the old data structures to the new ones.

I hate waiting for ip address changes to propagate.



I just use v2.shop.com on the same ip address. Then change the apache virtual host over when v2 is stable and ready

But then, don’t you have to move all of your files once you eliminate the virtual host reference? More complete instructions on this method would be helpful.

This assumes you run your own server.

And it’s advisable Not to do testing and devel on your production server.

And I haven’t done this in a while so the finer details escape me.

You can NOT turn on SSL for the new shop until the move is complete.



gobbledgook removed

I assume you’re referring to the htaccess file?

I would love to hear from others as to which plan they think is best: A separate server OR the same server (virtual host)?

[quote name=‘knoxbury’]I assume you’re referring to the htaccess file?[/QUOTE]



NO, it is NOT.



This is if you are running your own server and can edit the Apache config file

ok, thanks. And if I’m running on a hosted account with no access to the Apache config file, would you suggest the option I outlined initially (2 different servers)?

There are many ways to skin a cat. So anyway is acceptable as long as it gets the job done.



With your method. A couple of weeks before the move, I would change the TTL of the dns records to something like 5 minutes. So when you change the ip addresses. It should take 5 minutes max for the change over to occur.



Remember to change it back afterwards!





No matter what method. Remember to backup!

In my case, it doesn’t seem like I have another way to skin the cat. Since I don’t have access to the Apache config file, I assume the 2 server method is my only option . . . unless someone has another suggestion.



I’ve heard of some developing locally and then uploading everything to the production server, but that seems problematic and could cause longer downtime once the old store is closed.

I don’t know why you would have to do anything to the Apache config file.



If you have access to your server and you can edit your files then you need to create a folder/subdomain (name it “cscart2” or something). Now upload the software in that folder then run the install: h**p://www.my_site.com/cscart2/install/



If you are going to run SEO then you will need to edit the .htaccess file. Also if you don’t want cscart2 to be indexed, then you need to disallow it in the main robot.txt file.

[quote name=‘kogi’]I hate waiting for ip address changes to propagate.



I just use v2.shop.com on the same ip address. Then change the apache virtual host over when v2 is stable and ready[/quote]


[quote name=‘Tool Outfitters’]I don’t know why you would have to do anything to the Apache config file.



If you have access to your server and you can edit your files then you need to create a folder/subdomain (name it “cscart2” or something). Now upload the software in that folder then run the install: h**p://www.my_site.com/cscart2/install/



If you are going to run SEO then you will need to edit the .htaccess file. Also if you don’t want cscart2 to be indexed, then you need to disallow it in the main robot.txt file.[/quote]



Lets say I have 1.35 installed in a vhost folder named mysite.com (hxxp://www.mysite.com) and I install v2 in a vhost folder named mysite2.com.



Once I get v2 ready for production, can I just delete the mysite.com folder and database and rename my v2 folder mysite.com, then just use the CS-Cart admin panel to change name from mysite2.com to mysite.com?



Would that work? Then do I need to do anything to the database?

[quote name=‘jeffshead’]Lets say I have 1.35 installed in a vhost folder named mysite.com (hxxp://www.mysite.com) and I install v2 in a vhost folder named mysite2.com.



Once I get v2 ready for production, can I just delete the mysite.com folder and database and rename my v2 folder mysite.com, then just use the CS-Cart admin panel to change name from mysite2.com to mysite.com?



Would that work? Then do I need to do anything to the database?[/QUOTE]



No. That would be running two domain names in the same set-up. Like I stated previously, according to your example, you need to create a folder named “mysite2” within the root of “mysite” thus the url will be: h**p://www.mysite.com/mysite2/



When you are ready to go with “mysite2” then all you need to do is delete all the files (with the exception of “mysite2”) in the root “mysite” then move the files in “mysite2” to the root.

i very interest by ur discussion



do you have any idea for upgrade the database i try to import csv file but pfffff without succes .



many thks for your answer



regards



sam



sorry for my bad english ( french nativ )

[quote name=‘Tool Outfitters’]No. That would be running two domain names …[/quote]

[COLOR=#38a9cf][/COLOR]What a dummy I am. I wasn’t thinking when I made my post.



So that’s it? No edits in the admin control panel or database to compensate for the folder change? Sorry to keep asking, but it’s been over a year since I’ve played around with my CS-Cart website.

[quote name=‘samsam’]i very interest by ur discussion



do you have any idea for upgrade the database i try to import csv file but pfffff without succes .



many thks for your answer



regards



sam



sorry for my bad english ( french nativ )[/QUOTE]



samsam,



You could update it manually but there are some different named fields betweeen 1.3.5 & 2. You need to figure them out and edit them before uploading.




[quote name=‘jeffshead’][COLOR=#38a9cf][/COLOR]What a dummy I am. I wasn’t thinking when I made my post.



So that’s it? No edits in the admin control panel or database to compensate for the folder change? Sorry to keep asking, but it’s been over a year since I’ve played around with my CS-Cart website.[/QUOTE]



The only other thing you would need to do is create a database in mySQL and name it something like “mysite2”.

[quote name=‘jeffshead’][COLOR=#38a9cf][/COLOR]What a dummy I am. I wasn’t thinking when I made my post.



So that’s it? No edits in the admin control panel or database to compensate for the folder change? Sorry to keep asking, but it’s been over a year since I’ve played around with my CS-Cart website.[/QUOTE]



I would think there would have to be an edit in the db if you go this route, otherwise, how would it know to look in the root instead of the cscart2 folder?

[quote name=‘knoxbury’]I would think there would have to be an edit in the db if you go this route, otherwise, how would it know to look in the root instead of the cscart2 folder?[/quote]That’s what I was wondering.



I did create a new database and I did install v2 in a new folder in the root.



I searched the entire db for the name of the new folder, but got zero returns.



I guess that means everything is relative and there is no need for a static path because the page looks for the db, not the other way around.



I have not had time to test further. I will rename the folder of the v2 install and see if the cart still functions properly.

When setting up the initial settings when installing, you will state the name of the database that you want to use.