Migrating the Green Guide CMS from Strapi 4 to Strapi 5
July 10, 2026
14 min
The Green Guide is a digital platform that helps discover sustainable initiatives, businesses and organisations in and around Ghent. The platform consists of a public website, an Expo-based mobile application for iOS and Android, and a Strapi-based headless CMS that acts as the single source of truth for all content.
The CMS contains over twenty content types, seven single types and more than 2,000 registered users. Besides serving as a content management system, it exposes an API consumed by both the mobile applications and the website.
Although the platform was stable on Strapi 4.26.2, maintaining new functionality increasingly required custom implementations. Features such as internationalisation and Draft & Publish workflows had significantly improved in Strapi 5, making migration the logical next step.
1
The challenge
Migrating a production headless CMS while preserving all content, supporting multiple client applications and handling breaking API changes.
2
Solution
A staged migration strategy using local backups, the official Strapi migration tool and iterative validation across the CMS, mobile app and website.
3
Approach
Upgrade the CMS first, then progressively restore custom logic, migrate API consumers and validate every business-critical workflow.
4
Outcome
Successfully migrated the complete platform to Strapi 5 with zero data loss and less than ten minutes of website downtime.
1. The Challenge
At the heart of the Green Guide platform sits a Strapi CMS that powers every piece of content across the ecosystem. It serves as the central source of truth for the public website and an Expo-based mobile application running on both iOS and Android.
The CMS itself consists of:
- 20 collection types
- 7 single types
- More than 2,000 registered users
- A PostgreSQL database
- A icon picker plugin
- Multiple custom lifecycle hooks
- Several custom API endpoints
While the platform had been running reliably on Strapi 4.26.2, continuing development became increasingly difficult. Features such as internationalisation and Draft & Publish required more and more custom implementations, while many of these capabilities had become first-class features inside Strapi 5.
The migration therefore wasn't simply about updating dependencies — it was about modernising the technical foundation of an entire production platform.
2. Preparing for a High-Risk Migration
Because the CMS powers every client application, the migration couldn't afford any production data loss.
Before changing a single line of code, I created complete backups of:
- The PostgreSQL database
- The Render Persistent Disk containing all uploaded assets
Rather than migrating directly on production, I restored these backups into a local PostgreSQL instance and performed the complete migration locally first.
Only after validating the migration locally did I continue with a dedicated test database.
This staged approach ultimately proved to be one of the most important technical decisions of the entire project.
3. Executing the Migration
The migration itself started with the official Strapi migration tool, which automatically upgraded the project structure and dependencies from Strapi 4.26.2 to Strapi 5.
During the first migration attempt, however, an unexpected issue appeared.
Localized content unexpectedly lost its locale references because locale values inside the database had been converted to NULL. As a result, translated entries were no longer linked together correctly.
Rather than attempting to manually repair the data, I restored the original backup and investigated the issue further. After researching the problem, I discovered reports indicating that the issue had been resolved in Strapi 5.8.0.
Starting again from the untouched backup, the migration completed successfully. From there I upgraded incrementally until reaching Strapi 5.50.0 without further issues.
Although I'm still not entirely certain why the first migration failed, the experience reinforced an important lesson: backups and local validation are absolutely essential when performing large production migrations.
4. The Biggest Breaking Change
Initially, my plan was to migrate only the CMS.
Based on the Strapi migration documentation, I had read that it was possible to temporarily preserve the Strapi 4 API response format by enabling the compatibility middleware. My expectation was therefore to upgrade the CMS first, while postponing the required changes to the website and mobile application until a later stage.
At first, this appeared to work.
The familiar attributes wrapper could indeed be restored, allowing existing API responses to closely resemble those from Strapi 4.
However, this compatibility only went so far.
As soon as I started testing resource-specific endpoints, such as fetching individual records, I discovered that Strapi 5 still expected a documentId instead of the traditional numeric id. While the response format could be made backwards compatible, the endpoint behavior itself could not without a complete custom implementation. And precisely because we wanted to avoid too many custom changes, this was not a viable option.
This meant that every API consumer still needed to be updated.
What initially seemed like a phased migration quickly evolved into a migration of the complete platform:
- The CMS
- The Expo-based mobile application
- The public website
On top of that, once the temporary compatibility layer was removed, both frontend applications still had to adopt the new Strapi 5 response structure, and so I decided to tackle it all at once.
In the end, what started as a straightforward CMS upgrade became a coordinated migration across every application relying on the Green Guide API.
5. Rebuilding Custom Functionality
After verifying that the migrated content appeared correctly inside the CMS, I temporarily disabled all custom lifecycle hooks and custom API endpoints.
This allowed me to validate the migrated data independently before rebuilding custom functionality.
Once the core API was functioning correctly, I gradually reintroduced each lifecycle hook and endpoint, validating every change individually.
AI-assisted coding significantly accelerated this stage by handling repetitive syntax changes. However, because many lifecycle hooks contained business-specific logic, every implementation still required careful manual review and testing.
Another challenge was the icon picker plugin that we used from the Strapi marketplace.
The original plugin had been deprecated and no longer supported Strapi 5. Fortunately, I found an alternative plugin that provided identical functionality, allowing the migration to continue without affecting the editing experience.
6. Updating Every API Consumer
The mobile application became the primary testing environment while rebuilding the CMS.
Updating the application involved replacing every usage of id with documentId, adapting to the new API response format and validating every endpoint against the upgraded backend.
Once the mobile application was functioning correctly, I moved on to the website.
This migration progressed much faster thanks to Visual Studio Code's regular expression search and replace functionality.
Rather than manually updating every model separately, I could perform large - scale replacements across the codebase—for example replacing property names ending in Id with their new DocumentId equivalents.
Another unexpected obstacle appeared during the website migration.
The business dashboard relied on FormData, which is no longer supported by Strapi 5 in the same way as before.
Rather than delaying the entire migration by rewriting these functionalities immediately, we decided to temporarily redirect business users to the mobile application, where the same management functionality was already available.
This allowed the migration to be completed on schedule while leaving the dashboard redesign for a later phase.
7. Validation
Every stage of the migration was validated manually before continuing.
Testing included:
- CMS validation
- Local API verification
- iOS & Android simulator testing
- Website testing
- Complete merchant reward flows
- Complete customer reward flows
Only after every critical business flow had been successfully tested was the production deployment scheduled.
8. Results
The complete migration was finished in approximately 2 weeks.
| Platform Component | Modified Files | Lines Added | Lines Removed | Total Changes |
|---|---|---|---|---|
| CMS Strapi 4.26.2 → 5.50.0 | 58 | +14,858 | -13,716 | 28,574 |
| Website | 161 | +1,278 | -1,611 | 2,889 |
| Mobile Application | 144 | +1,450 | -1,495 | 2,945 |
| Total Platform Impact | 363 | +17,586 | -1,822 | 34,408 |
Most importantly, the migration completed:
- Without any production data loss;
- Approximately 10 minutes of planned website downtime;
- While presenting users of the mobile application with a maintenance screen overnight until the updated version became available the following morning.
In addition to the successful migration itself, Strapi 5 immediately brought several noticeable improvements, including a more polished administration interface, improved internationalisation support, better Draft & Publish workflows and a more modern overall editing experience.
9. Lessons Learned
Looking back, several practices made the migration significantly more manageable.
- Always create complete database and asset backups before upgrading.
- Never perform a major migration directly on production.
- Test the entire migration locally before deploying to a staging environment.
- Use Git extensively to monitor progress and quickly identify regressions.
- Leverage regular expressions for repetitive API refactors such as replacing
idreferences or removing obsoleteattributeswrappers. - AI can dramatically accelerate repetitive migration work, but business logic still requires careful manual validation.
Conclusion
Migrating from Strapi 4 to Strapi 5 turned out to be much more than a dependency upgrade.
Because the Green Guide architecture relies on a shared headless CMS, changes to the API propagated throughout the entire ecosystem, requiring coordinated updates across the CMS, the website and the shared Expo mobile application.
Through careful preparation, iterative testing, comprehensive backups and staged deployment, the migration was completed without data loss and with minimal downtime.
Beyond simply reaching Strapi 5, the project provided a significantly stronger technical foundation for future development while reducing the amount of custom code previously required to support growing platform requirements.