Firstly, you should perform an upgrade on a COPY of your site, rather than the live site, so:
- 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 https://www.mywebsite.com), your copied files will be in https://www.mysite.com/copy/
You must make sure to have an exact "replica" of all the files in the copied directory - including all your customised files and add-on module files.
-
Create a copy of the database, giving it a different name to the live database. This is best performed in phpMyAdmin.
-
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.)
- 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.
-
From the Free-Add-Ons (link at top of this screen), go get a copy of fix_cache_key.php and FTP it to https://www.mysite.com/copy/
-
Point your browser to https://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.
- TEST your copied site. As it is currently an exact replica 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.