Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Strategies for upgrading database with numerous add-ons?

Strategies for upgrading database with numerous add-ons?

Views: 983

Results 1 to 7 of 7
16 May 2011, 9:37 PM
#1
ilikemike avatar

ilikemike

New Zenner

Join Date:
Dec 2010
Posts:
31
Plugin Contributions:
0

Strategies for upgrading database with numerous add-ons?

I can no longer escape the unavoidable... Despite no security issues whatsoever with my existing 1.3.8a based site (I have been super-careful about applying security patches and implementing each and every security tip), I decided to move on the 1.3.9h.

I decided to do so because the time has come to:

  1. Solve once and for all my PayPal Express Checkout problem.
  2. Get rid of a few unused add-ons while installing the greatest & latest versions of the majority of add-ons I decide to keep.

Now, I know that zc_install will take the entire database, as-is, and upgrade it to the latest version (so no data is lost and no installed addon settings are lost).

But since I installed a clean (no add-ons) version 1.3.9h as a base for my customization, I am wondering what would be the best strategy to import my existing data, including add-on data, from my 1.3.8a based store to the the 1.3.9h based one.

To be more specific, these are the add-on I currently have (the ones I intend not to keep, i marked with a greyed-out font):

  1. captcha_using_ttf__gd_v2-8_28-04-2007.zip
  2. local_sales_tax_mod_2.2.2.zip
  3. hidecategories_1-10.zip
  4. sitemapxml__formerly_google_sitemap_2-1-0.zip
  5. faq_page_v1-0.zip
  6. Ceon URI Mapping (SEO URL)
  7. Admin Profiles extension (AP)
  8. How Did You Hear About Us 1.3.8a
  9. Tabbed Products Pro 1.06

Is what I am trying to accomplish do-able?

If so, what caveats should I be watching for?

(I am aware of the need to repeat the tedious process of comparing files via WinMerge, since quite a few add-ons modify core Zen-Cart files).

Can I simply use phpMyAdmin to import to the new 1.3.9h store the .sql.gz file I export from the operational store (once I complete applying all the add-ons)?

16 May 2011, 10:17 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Strategies for upgrading database with numerous add-ons?

Summary:

  • take a copy of your site, including database
  • upgrade it
  • update all your addons, taking notes of anything special you need to do regarding admin settings and database changes, since you'll need to redo when going live
  • customize and tweak until it's just how you want it, again taking notes so you can repeat
  • import your live store's database to this test site
  • redo all admin settings from your notes and any addon database changes and any other tweaks
  • test test test
  • once ready, go to the live site, set down for maintenance, apply all the PHP file changes, run zc_install, apply all addon database changes, admin settings changes, tweaks etc, then test and turn off down for maintenance to go live
  • delete test site once live site is up and running

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 May 2011, 1:14 PM
#3
ilikemike avatar

ilikemike

New Zenner

Join Date:
Dec 2010
Posts:
31
Plugin Contributions:
0

Re: Strategies for upgrading database with numerous add-ons?

@DrByte Thanks for your advice, which confirms what I discovered after installing barebone 1.3.9h and then discovered how daunting it would be to re-apply all the customization work I did so far (some of the add-ons are inter-mingled with the visuals the template).

So, if I understand your summary correctly, it is easier, less time-consuming and perhaps safer, to upgrade an existing copy (and then tweak it) than starting from fresh.

Is this correct?

And a follow up question regarding this step:

Once ready, go to the live site, set down for maintenance, apply all the PHP file changes, run zc_install, apply all addon database changes, admin settings changes, tweaks etc, then test and turn off down for maintenance to go live

Why re-apply all PHP changes, if I already have a copy that is "tested tested tested"? Wouldn't it be simpler to copy the tested copy over to the operational site?

17 May 2011, 2:54 PM
#4
pagypsy avatar

pagypsy

New Zenner

Join Date:
Nov 2007
Posts:
28
Plugin Contributions:
0

Re: Strategies for upgrading database with numerous add-ons?

on a similar note, i was under the impression that it would be easier and safer to do a clean install, rather than comparing the thousands of different files in winmerge. thousands of different files is what i have, thus the consideration of a clean install. i have begun the upgrade process several times and then deleted and started over. after importing the database to the clean install, mostly everything is there except for my template and cosmetic changes. the add-ons come along too, but of course are not working until you reinstall each addon. wouldn't a clean install be less time consuming than an upgrade where thousands of files need to be compared side by side? if so, the only question i have, and which stops me from completing the upgrade/clean install, is how do you uninstall the add-ons (to re-install new versions of each) from the database after it's been imported?

i've read the upgrade instructions several times. i've tried it several times. but i stop when it comes to comparing all the files.

18 May 2011, 12:05 AM
#5
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Strategies for upgrading database with numerous add-ons?

The clean install approach might be the best route if you're modifying your site as well as upgrading it. I did that with my retail site for just that reason.

As for "how do you uninstall the add-ons (to re-install new versions of each) from the database after it's been imported?" A well written add-on that needs to modify the database will have both an install.sql file and an uninstall.sql file. So you'd run the uninstall.sql file. If you just mean that there are settings in admin that you'd like to somehow unset, that's not so easy. But I wouldn't worry about it either. You're going to be spending lots of time in the admin getting things setup, so you'll make your adjustments there as you go. I worried about the same things when I was hemming and hawing about the upgrade, but once I started it, everything went smoothly.

Rob

Breakfast: the most important donut of the day.

18 May 2011, 6:22 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Strategies for upgrading database with numerous add-ons?

ilikemike:

Why re-apply all PHP changes, if I already have a copy that is "tested tested tested"? Wouldn't it be simpler to copy the tested copy over to the operational site?How is that different from "re-applying all PHP changes"?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 May 2011, 6:23 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Strategies for upgrading database with numerous add-ons?

**Folks, everyone wants a shortcut. I strongly advise against shortcuts. **Only take shortcuts when you have a SOLID understanding of EXACTLY what you're doing.
And, frankly, if you're asking how to shortcut, then you're exposing the fact that you probably shouldn't be taking shortcuts. No offense intended in that statement. Just observations from lots of experience.

The main PURPOSE of using WinMerge is to identify for YOURSELF all the customizations you need to re-do in the new version files before they'll be ready to use on your live site. That's explained in the Tutorial on the topic: https://www.zen-cart.com/tutorials/index.php?article=98 If you look at it from that angle you're just quickly rebuilding your site from scratch, but using WinMerge to very quickly show you what you'd previously customized so that you can redo it again in a few minutes instead of taking much longer.

As for uninstalling old mods, as Rob says, just uninstall them the way you'd uninstall any mod even if you were not doing an upgrade. It's the same procedure either way.

Whatever you do, MAKE SURE you DO NOT directly upgrade your LIVE site until you've TESTED it completely on a test site. ONLY THEN is it appropriate to apply all the changes to your live site. Again, follow the official upgrade instructions as mentioned at https://www.zen-cart.com/tutorials/index.php?article=98 and its linked articles.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.