Database-Only Upgrade Instructions
Warning!
This is not the standard upgrade procedure. It will DEFINITELY cause you to lose functionality associated with your older customizations and could break things as you will have configuration settings with no associated files (sideboxes, template, etc.).
Doing a database only upgrade might be appropriate in situations like this:
- you are coming from Zen Cart 1.5.4 or older version, and you don’t have time or budget for a proper upgrade.
- your hoster just updated PHP to a version which is not compatible with your older Zen Cart software, and your cart no longer works.
- you have minimal customizations and your current template is not mobile compatible, and you just want to get current.
You will lose your customizations, but you won’t lose your data and you’ll be using the latest software, which is more secure.
You will be using the responsive_classic
template initially. You can always add a new template later after your store is up and running.
Setup
Note that if you are building a test version of your cart that uses a different version of PHP than your live site, see Multiple PHP Versions for instructions, since the procedure is a little different.
- CRITICAL: Back up your site
- CRITICAL: Backup your database
- Create a new directory called “test” and put the latest version of Zen Cart into it. We’ll call this your test site.
- Then create a new database and load your old database in it
- Do any database conversions necessary - only necessary if you have custom date fields
- Next, change the two configure.php files to utilize the new directory and database This way … when you attempt to upgrade you are “practicing” to see where the problems, if any will happen
- Run the installer at
https://www.YOURSITE.com/zc_install
. Note: if your current PHP version is very old, you may need to change it to run the installer. This will likely take down your live store. If you aren’t sure you can get this whole procedure done quickly, consider setting up a test environment and doing the upgrade there. - Choose the Upgrade option
Older versions of Zen Cart have buttons like this:
The zc_install process
Once you press the Upgrade button, the screen will show you a list of updates to be performed.
Be patient - it can take a while to do all the updating required.
Once this action completes, you have an up to date copy of your database.
Be sure to check for zc_install
created logfiles, which could indicate an issue during your upgrade. Seeing new debug logs from normal storefront operation could indicate a problem which occurred during database upgrading; see Unknown column error after upgrade for an example.
Database Changes
- Go to Admin > Tools > Template Selection and set your template to Responsive Classic (since your old template won’t exist on your updated site).
- Visit each of the admin pages Modules > Shipping, Modules > Payment, Modules > Order Total to allow your modules to insert any missing keys. Some modules may require re-installation to add keys.
Copy from live site
- Copy the
/images
folder from your live site onto your test site. - Copy in any new images you created from your live site’s
includes/templates/YOURTEMPLATE/images
folder to the test site’sincludes/templates/responsive_classic/images
folder. - Copy in any new images you created from your live site’s
email
folder to the test site’semail
folder.
Customization
- Customize only the critical language files. See Basic 158+ Language Customizations.
Testing
- Create a test order, take it all the way through to checkout success, then view the order in your test admin. Make sure everything is working as expected.
Updating PHP
If you have a little more time …
It’s worth your while to switch from the Responsive Classic template to the Bootstrap template. It looks much better and it’s just a bit more work. Redo the basic language customizations step for the storefront, using placing the files in includes/languages/english/bootstrap
.
After Golive
- Check out the Regular Periodic Maintenance thread for things you should be doing regularly.
- Be sure you are subscribed to the Known Bugs thread for your release. Update your store as fixes are announced.