Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2007
    Posts
    43
    Plugin Contributions
    0

    Default Advice/Guidance Needed

    Hi All
    I have had a successful zencart 1.3.7 store up and running now for 2 years and I am now looking to upgrade the site to 1.3.8a. Now as the site is highly customised with a fair few modules added I am reluctant to upgrade the site and compare using winmerge - as I know I will be there forever comparing the files.

    As the design of the site will also be changing - I am in the process of installing a fresh version of 1.3.8a locally on my machine with a view to finalising the new site locally and then uploading to my live hosting.

    I have a couple of questions:
    1. Once the new site is finished - do I simply delete the old live site and upload my new files? Will doing it that way retain my customers records and products?

    2. Should I patch my database up to 1.3.8 then dleted my old site and upload my new site?

    3. Can I tuck away my new site in a seperate folder and do a complete new install and create a new DB but 'hide' it away on the server? (Thing is then there will be 2 stores running in the same space - that cant be good surely?)

    Im asking in advance as the site has been very successful and I want to minimise as much downtime as possible.

    Many Thanks in advance!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Advice/Guidance Needed

    There is a tutorial on upgrading and/or moving as some of the required steps are in moving.

    It is great for a non added to install....Your problem is that there are probably several mods that require a sql/db patch and some of these have newer versions for 1.3.8a

    I would do the new install with your mods and then only overrite/import from the old DB the tables for customers, orders. products, stc...NOT the old configuration table as the new one will have the new added mods data nor any of the tables added by a mod.

    Alternatively, you can check if the mod has an updrade sql and do it that way

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Advice/Guidance Needed

    Firstly, you should perform an upgrade on a COPY of your site, rather than the live site, so:

    1. Create a SUB-FOLDER on your server and copy all the zencart files into it. If you have C-Panel on your hosting account management, this task is quite simple.

    So, (if your live store is at www.mywebsite.com), your copied files will be in www.mysite.com/copy/

    You must make sure to have an exact "##############" of all the files in the copied directory - including all your customised files and add-on module files.

    2. Create a copy of the database, giving it a different name to the live database. This is best performed in phpMyAdmin.

    3. Now, in the COPIED site, you are going to have to make absoutely sure that all the customised folders and files are noted. If you followied the CUSTOM template procedures over the last two years, then at least your template and language files should be protected from any over-writes. There are some files (such as the defined pages html files) that risk being overwritten (but you still have the originals in the live site.)

    (Be aware, that later, after the upgrade, if you experience "blank" screens or incomplete page displays, then the reason is that a "new" file is somehow incompatible with the copied site and you may need to re-copy the "old" file from your live store.)

    4. When you are sure that you have a list of all the files you added or modified over the last two years, you EDIT the two configure.php files in the COPIED site - NOT your live site!

    The first edit is to point everything to the new directory (let's say you called it /copy/), so in the configure.php files, all paths that indicate the LOCATION of resources must now include that new directory /copy . Follow the advice given in the comment tags of these files.

    The second edit is to point the copied site to the copied database, so enter the appropriate information where it asks for database NAME, USERNAME and PASSWORD.

    Now, your configure files POINT to the new copied site AND the copied database.

    5. From the Free-Add-Ons (link at top of this screen), go get a copy of fix_cache_key.php and FTP it to www.mysite.com/copy/

    6. Point your browser to www.mysite.com/copy/fix_cache_key.php

    This will correct database paths to your new cache folder. It's an essential step so don't ignore it.

    When the cache is corrected, DELETE fix_cache_key.php from your server.

    7. TEST your copied site. As it is currently an exact ############## of the live site, it should function in an identical way. Note any errors and deal with them.

    PLEASE NOW BEAR IN MIND that the copied database is a "snapshot" of the live database at the exact instant that it was copied. If alterations and additions are made to the LIVE database from that point, the live database will contain new information NOT contained in the copied database. This is important, because if you take too long to perform the upgrade, you may have lots of sales on the LIVE site, that will not be reflected in the COPIED site!

    What I do is leave the copying of the database (STEP 2 above) to the last minute.

    I spend a LOT of time, making sure that the FILES are compatible - particularly edited and customised files, so I FTP a full copy of my files to my local drive and store them in a distinct directory. (You don't need to bring your images across - just the files).

    I then get a download of ZC 1.3.8a and use WINMERGE to compare my edited/customised files with their equivalent files in the core 1.3.8a version.

    If there are significant code differences, I use winmerge to append new code to my customised files.

    This can be a long process (several hours) but it is also vital.

    When I am confident that (on my LOCAL drive), my customised files now contain correct code that is compatible with version 1.3.8a, I proceed with STEP 2 above.

    I then put my LIVE site into maintenance mode so that while I upgrade, NO transactions can add data to the live database. (This ensures that my copied database and my live database will remain identical (content wise), while the upgrade is done.

    I then perform the ZC upgrade as per procedure on the COPIED site.

    After the upgrade, I test the copied site and if necessary, I FTP any/all custom files I earlier corrected in winmerge.

    Test some more, including all transaction capabilities, shipping, payment, coupons, vouchers, etc, etc.

    When I'm happy that all is OK with the COPIED site, I do a full backup of the LIVE site (still in maintenance mode).

    I now put the COPIED (upgraded) site into maintenance mode.

    I then MOVE the copied files (all the folders and directories and files) BACK TO MY LIVE SITE over-writing all 1.3.7 files.

    Now, you have to re-edit configure.php files to REMOVE the path to the copy/ directory. (Your upgraded files are now located in the original location of the live site).

    DO NOT change the database settings this time. It's your NEW (copied) database that has been upgraded, and that's where your site must now point!

    Re-do the FIX CACHE KEY steps on the upgraded site.

    Test the upgraded site in maintenance mode.

    When happy, let store go live.
    20 years a Zencart User

  4. #4
    Join Date
    Feb 2007
    Posts
    43
    Plugin Contributions
    0

    Default Re: Advice/Guidance Needed

    Hi Schoolboy/Kobra

    Thank you for your guidance! Just read through the steps and that's just what I needed - I was trying to get my head around the best way to do things and just couldn't without hitting down time.

    I'm not looking forward to step 4 however, as when I created the site I was a complete novice (I only had knowledge of html and I've always focused upon design as opposed to coding) and so I did not use the template overides etc - I am now familiar with them though as I have created 2 other zen cart stores i the past year doing things correctly. I'll just make sure i'm thourgh and take my time!

    Many thanks again both!

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Advice/Guidance Needed

    Pay careful attention to what Kobra says about Mods that have altered the database.

    Editing the configure.php files is quite straight-forward - just follow the instructions embedded in these files.

    The key really is to work on the COPIED site, not the LIVE site.

    If you make errors on the COPIED site, at least your live site remains intact.
    20 years a Zencart User

  6. #6
    Join Date
    Feb 2007
    Posts
    43
    Plugin Contributions
    0

    Default Re: Advice/Guidance Needed

    Hi All

    2. Create a copy of the database, giving it a different name to the live database. This is best performed in phpMyAdmin.

    I backed up my live database and downloaded it as an sql some time ago. I came to import the database back into a new one today so I can link that to the copied site and the sql file is way too large!.

    So I tried making a copy of my live db using PhpmyAdmin and Im having no joy whatsoever - I keep getting this error message:SQL query:
    CREATE DATABASE `_upgrade` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;


    MySQL said:
    #1044 - Access denied for user 'prugby'@'localhost' to database '_upgrade'


    I have a user account and logged in that way but no still no joy? Any other suggestions?
    Thanks in advance
    Nath
    Last edited by Kim; 17 Mar 2009 at 03:03 PM.

  7. #7
    Join Date
    Feb 2007
    Posts
    43
    Plugin Contributions
    0

    Default Re: Advice/Guidance Needed

    Oh dear!!!!

    I seemed to have made a basic error - doh!

    Make sure you put the prefix name in the "copy to" box in Myphpadmin:
    in my case - prefix_newdatabasename

    It's all a learning curve!!!!


 

 

Similar Threads

  1. mmmm...Meta Tags - help/guidance needed
    By woodlandsprite in forum Templates, Stylesheets, Page Layout
    Replies: 88
    Last Post: 15 Oct 2010, 03:23 AM
  2. guidance needed
    By humbll in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2007, 11:56 PM
  3. Guidance needed before I start
    By Xyon in forum General Questions
    Replies: 3
    Last Post: 11 Sep 2006, 08:43 PM

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