Context
Part of a long engagement on tintadlaplastykow.pl (in-house IHaveIT engine, 36k+ SKU, since 2022) — this thread: making the legacy store safe to move. Debian 10 and PHP 7.4 were out of support, and PHP 8.5 could not be installed there. Before the new server went live, the kinds of issues typical of old code had to be fixed, the dead code removed and the shop brought up to PHP 8.5.
Scope
- Security before the move — before the new server went live, the kinds of issues typical of legacy shop code were fixed: the public storefront, the admin session and files that should not be reachable from the network. Those were closed ahead of the cutover. Customer passwords moved to modern hashing, admin writes are protected against forged requests, and cron and CLI scripts no longer answer over HTTP.
- Code that can actually run — Smarty removed (PHP views), dead storefront and admin modules, dead integrations (Poczta, PayU, Doofinder, Półka) and hand-copied libraries.
composer.lockandpackage-lock.jsonin the repo. JSON error logs and an hourly alert on fatals, replacingerror_reporting(0). - PHP 7.4 → 8.5 without changing behaviour — nulls passed into built-ins,
eachandcreate_function, static calls, dynamic properties. Storefront, checkout, account and admin clicked through on a copy of real data; fixes where 8.5 turns a 7.4 warning into a fatal. WordPress updated and moved to its own database. - New server and cutover (8 November 2026) — Ubuntu, Apache, PHP-FPM 8.5, MariaDB, configuration in the repo. From the old host: database, photos and blog uploads only. Releases: a CI package, a release directory, a symlink, migrations before the switch, smoke checks and a rollback in about a second. Staging and a dress rehearsal before the Cloudflare DNS change. During the maintenance window, 86 MyISAM tables moved to InnoDB.
Result
- The shop runs on PHP 8.5. After the cache warmed, the same URLs answered in 0.3–0.6 s versus 0.9–1.3 s on the old host.
- Cutover checked with a test order (Przelewy24) and the admin panel. Errors go to Sentry. Rollback is the previous release.
