If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading to 1.5.x / 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

Started by wrxh8r on 6 Feb 2013, 11:38 PM · Views: 1,722

Results 1 to 6 of 6
6 Feb 2013, 11:38 PM
#1
wrxh8r avatar

wrxh8r

New Zenner

Join Date:
Aug 2010
Posts:
14
Plugin Contributions:
0

1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

Is it ok to build a complete 1.5.1 site first with all template changes etc then import old database.
I assume you need to reinstall sql files for mods once imported and upgraded. Or am I missing something.

7 Feb 2013, 12:06 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

At the end of the day, the contents and configuration of the database must match the functional code(s) driving the behaviour.

An additional consideration is that many modules for 1.3.9 have been upgraded to suit 1.5.x.

Here's what I usually do (it can be different depending on the original config).

  1. Create a CLONE of the existing site (I do my clones on a separate DEV server, far away from the original site. I DO NOT use local setups like Wamp)

  2. On the CLONE (and only on the clone), I UN-INSTALL all modules, both files and DB inserts, when these are evident. (Not all plugins. add-ons affect the dbase.)

  3. Basically, I take the clone back to CORE behaviour.

  4. I note ALL the sql commands to remove plugin additions, because I will need these later.

  5. When I have the COPY (clone) site back to core behaviour, I do an upgrade on it in the standard manner.

  6. I then load current versions (ie: v.1.5) of the plugins. If any plugins that I used in the original site are not yet upgraded to 1.5, I leave them out.

  7. I TEST THE UPGRADED CLONE...

  8. When I am happy that it all works properly, I put the LIVE SITE into maintenance mode. I do this late on a Friday night to not disrupt selling time if possible.

  9. I then copy the original site's database again, load it on to the DEV server, and link it to the now-upgraded clone. In phpMyAdmin, I run the uninstall sql patches for the old plugins.

10 again in phpMyAdmin I run the NEW sql inserts for new plugins

  1. I FTP the 1.5.1 ZC INSTALL folder back to the Dev server (to the clone's root)

  2. I run zc_install. making sure to select DATABASE UPGRADE ONLY.

  3. I TEST everything again.

  4. I BACKUP the original site again.

  5. I REMOVE the original site and its database

  6. I move the upgraded clone from the DEV server to the LIVE server.

  7. I TEST AGAIN.

  8. When happy, I remove "down for maintenance"

20 years a Zencart User

7 Feb 2013, 12:57 AM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

schoolboy:

At the end of the day, the contents and configuration of the database must match the functional code(s) driving the behaviour.

An additional consideration is that many modules for 1.3.9 have been upgraded to suit 1.5.x.

Here's what I usually do (it can be different depending on the original config).

  1. Create a CLONE of the existing site (I do my clones on a separate DEV server, far away from the original site. I DO NOT use local setups like Wamp)

  2. On the CLONE (and only on the clone), I UN-INSTALL all modules, both files and DB inserts, when these are evident. (Not all plugins. add-ons affect the dbase.)

  3. Basically, I take the clone back to CORE behaviour.

  4. I note ALL the sql commands to remove plugin additions, because I will need these later.

  5. When I have the COPY (clone) site back to core behaviour, I do an upgrade on it in the standard manner.

  6. I then load current versions (ie: v.1.5) of the plugins. If any plugins that I used in the original site are not yet upgraded to 1.5, I leave them out.

  7. I TEST THE UPGRADED CLONE...

  8. When I am happy that it all works properly, I put the LIVE SITE into maintenance mode. I do this late on a Friday night to not disrupt selling time if possible.

  9. I then copy the original site's database again, load it on to the DEV server, and link it to the now-upgraded clone. In phpMyAdmin, I run the uninstall sql patches for the old plugins.

10 again in phpMyAdmin I run the NEW sql inserts for new plugins

  1. I FTP the 1.5.1 ZC INSTALL folder back to the Dev server (to the clone's root)

  2. I run zc_install. making sure to select DATABASE UPGRADE ONLY.

  3. I TEST everything again.

  4. I BACKUP the original site again.

  5. I REMOVE the original site and its database

  6. I move the upgraded clone from the DEV server to the LIVE server.

  7. I TEST AGAIN.

  8. When happy, I remove "down for maintenance"This is EXACTLY how I do it.. Wanted to add I only use a LOCAL server for testing things that MAY be put in use on a client site but I NEVER do client dev on a local server..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Feb 2013, 3:30 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

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

31 Jan 2015, 12:30 PM
#5
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

DrByte:

http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
Hi.
I have carefully read all what in the link above from DrByte.
What I would like to do when it comes t the db is exactly the opposite.
In other words I want to start with a fresh install, in a test folder with a new db named test.

  1. Install in the test version all the plugin mods and hacking I did in the live site and may be also another template.
  2. Import the needed data from the live db to the test db.
  3. Test test test and test again.
  4. Go in maintenance status with the live site.
  5. Import the needed data from the live db to the test db.
  6. Back up the live db and files.
  7. Delete all the live files
  8. Copy all the test site (not the configures files) in the live site.
  9. delete all the tables from the live db
  10. Import all the tables in the live db from the test db.
    It worth to underline that I need to use the italian version because of the VAT and CF fields that are not included neither managed by the original version of zen cart.
    Also the italian version includes by default files and tables managing the multilanguage ezpages function but I have learned how to take it back to original version because this makes the italian version incompatible with the templates free or paid present in the market.
    Now my question is:
    How can i do what in step 2 and 5?
    Do I need to do it table by table? If os were cna i find a list of the tables that I need to import?
    Is there a tool that is able to import the data without incurring in errors like table already exixsts or data already exists?
    I have also read d post telling to use add drop and under Data, choose "Complete Inserts" and "Extended Inserts", but I can not find this in my phpMyadmin version 4.0.10.7. However would this be enough?
    Thanks
    ciao from Italy
    enzo
1 Feb 2015, 12:18 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: 1.3.9 to 1.5.1 build testsite on 1.5.1 then import old database

enzo-ita:

How can i do what in step 2 and 5?
Do I need to do it table by table?
Yes and no. You actually need to do it row-by-row. And thus THAT APPROACH SHOULD BE AVOIDED!!!!! It's prone to error, both technical error and human error. And is totally unnecessary.

It's FAR MORE RELIABLE to use the method I described: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

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