15-year-old site · GBK + encrypted core · new engine, same content
A CMS site that had been running for fifteen years: GBK encoding, parts of the codebase shipped as encrypted Zend files, templates welded to the data layer. It had to move servers, gain a mobile layout, and keep its search rankings.
Read-only backup of site and database, table by table row counts compared. Articles, categories, a 1,748-row people table and attachments were loaded into SQLite. The template layer was rewritten in plain PHP while keeping every URL shape, and old links were 301'd one by one.
Search moved from a LIKE full scan to an FTS5 virtual table kept in sync by triggers, with Chinese text split per character and matched by prefix. List pages switched to cursor pagination so deep pages stay cheap.
Download source ↓ (free with an account)