Could not upgrade to version X

Troubleshooting a failed database upgrade

If you get a message like,

“Could not upgrade to version 1.5.7. We detect that you currently have v1.5.5, and must perform the updates to get to version 1.5.6 first.”

Could not upgrade

What has happened is that the upgrade has stopped because one of the tests which ensures prior updates were done has failed. Each database upgrade to version X will spot check whether all prior upgrades have been completed, and stop if not.

The file zc_install/includes/systemChecks.yml contains the list of checks done at each version to ensure that the database has actually been up to date. So in the case above, reviewing the 1.5.6 checks will narrow down the things to check to see what might have failed.

One very common root cause for this issue is a failure running an ALTER TABLE required by an upgrade because the table in question still has old format dates. See the page date standardization for instructions on how to fix this.

Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified June 25, 2021 by Scott C Wilson (cd61759).