PHP 8.3 Upgrade for OpenCart / ocStore
PHP 8.x upgrade for OpenCart and ocStore
Your host is warning that the old PHP version is being switched off, or the store is already showing errors after a forced upgrade. The problem is almost never the OpenCart core itself — it survives the transition relatively calmly. What breaks are third-party modules and the theme, written for PHP 7.
What actually breaks
- functions removed in version 8 — code using them simply stops with a fatal error;
- access to non-existent array keys: previously a notice, now considerably stricter;
- passing
nullto functions that no longer accept it — the classic cause of a blank product page; - the modifications page in the admin, which on stock OpenCart 3 returns a 500 error immediately after moving to PHP 8;
- old paid modules compiled for a specific PHP version — they will not run until the author releases an update.
Order of work
An inventory first: which modules are installed, which have compatible versions, what will need replacing. Then a code check on staging with full error reporting enabled, rather than by eye. Then fixing what was found, an end-to-end purchase test, and only after that switching the version on the live site.
Why you should not just flip the version in the panel
Because some errors are not visible immediately. The store opens, the catalogue works — but checkout fails, or emails stop being sent. That surfaces days later, in the form of lost orders.
What you get
A store on a supported PHP version, with working modules and a verified checkout. A side effect is usually a noticeable speed gain: the eighth branch is appreciably faster than the seventh.
Where the OpenCart version is too old to run on PHP 8 at all, it is more honest to talk about migrating between versions — and I will say so before starting, not midway through.
Tags: php 8.3, opencart, migration, upgrade, compatibility