Migration Strapi V4 → V5 : tout ce qu’il faut savoir

Strapi 5 is a game changer. Key new features, pitfalls to avoid and step-by-step migration method to move from Strapi V4 to V5 safely.

September 25, 202510 minFFloriane· Smotly
Web newsShowcase websiteStrapi
Migration Strapi V4 → V5 : tout ce qu’il faut savoir

Why Strapi V5 migration is essential?

Strapi 5 is not a “comfort” update: it is a major technological development.

As the end of support for V4 approaches (October 2025), migrating to Strapi 5 becomes a security, compliance and sustainability issue. Above all, Strapi V5 brings concrete benefits: clearer API (flattened responses), Document Service which unifies drafts, versions and i18n, native versioning, and a modernized DX (TypeScript, Vite) for superior performance and maintainability.

Strapi 5: the big new features to remember

Strapi 5 is not just an upgrade; it’s a rethinking of the foundations. You feel it as soon as you open the project: the structure is more coherent, API exchanges are more readable and editorial workflows become more fluid.

📑 Document System : unifier brouillons, locales et versions

The most structuring change is the Document System. Where V4 dispersed drafts, localities and variations, V5 unifies everything under the same model. The Document Service API becomes the single entry point: we centralize the logic, we limit the assembly code and we secure developments. In use, this translates into more controlled plans and fewer side effects when the project grows.

🔗 Simplified API responses and flattened payloads

Another key point: API responses. No more lengthy data/attribute nestings. Payloads are flattened, more predictable, faster to consume on the front end, and less expensive on the server side. Integrations gain clarity, as does type generation; we spend less time “unpicking” objects to reach useful data.

📝 New tools for content editors

On the publishing side, V5 deals with everyday irritants. conditional fields automatically adapt forms to the context, limiting errors. Creating relationships “on the fly” avoids going back and forth in the admin. The live preview allows you to validate a rendering before publication. And native versioning — with history — finally provides the expected editorial security: track, compare, restore.

💻 A modernized developer experience

For developers, the stack is modernized without compromise: TypeScript is at the heart of the product, the admin switches to Vite for faster builds and a truly comfortable HMR, the Plugin SDK structures the creation of extensions, and an official JS/TS client simplifies access to APIs. Result: less technical debt, a better-defined expansion area and faster onboarding of new recruits.

⚡ Improved performance and scalability

In the background, Strapi 5 also focuses on performance and scalability. Lighter payloads, faster tooling and updated dependencies provide stability in production, particularly on rich models (deep relationships, dynamic zones, multi-locale).

In short: Strapi 5 clarifies the architecture, professionalizes the experience and better prepares projects to last. This is exactly what we expect from a headless base in 2025.

Issues and pitfalls of migration: what to anticipate

Migrating from Strapi V4 to V5 is not a “one-click” operation. It is a change of base which requires serious technical framing and methodical execution.

Risk #1: Compatibility and ecosystem

The first risk is plugins. Not all are ported to V5 and some relied on now deprecated bricks (notably the helper-plugin). A prior audit is required: identify each extension (official, marketplace, internal), check its V5 version, decide on a case-by-case basis between update, functional replacement or redesign via the new SDK Plugin. The objective is twofold: secure the version upgrade and avoid incurring application debt.

Risk #2: Data, schematics and engines

V5 executes data migrations at first start, but several structuring developments require particular attention. The introduction of the documentId (which unifies versions and locales), the relationship adjustments, as well as the new population logic (notably on dynamic zones) may require targeted adaptations. On the engine side, certain stacks are no longer supported (for example, switching to better‑sqlite3 for SQLite, mysql2 for MySQL): it is necessary to validate the compatibility of the environment before** any cut‑over and provide a freezing window with a clear fallback plan (backups, tested restoration).

Risque n°3 : Code et personnalisations

The heart of the work is often here. The replacement of the Entity Service by the Document Service API, the rewriting of certain hooks (lifecycle) and the disappearance of historical helpers require a careful rereading of the overloads (controllers, services, middlewares, policies). The codemods automate part of the changes, but the final quality relies on a manual review: consistency of calls, behavior of hooks in new contexts, and verification of sensitive paths (creation/editing, rights, i18n).

In practice, a secure migration is prepared as a project in its own right: initial audit, functional batch strategy, pre-production environment as close as possible to production, non-regression tests (functional and performance) and proven rollback procedure. Thanks to this discipline, make your migration a lasting gain in robustness and maintainability.

Migration step by step: method and best practices

A Strapi V4 → V5 migration is prepared as a project in its own right. The objective is not to “upgrade” to V5, but to get there without additional debt with a controlled level of risk and a peaceful return to production.

1) Planifier avant d’agir

Start with a clear framework: update your V4 to the latest available patch, freeze content developments during the migration window, inventory third-party integrations and custom code potentially affected by breaking changes. Backups must be complete (base, media, code) and their restoration tested; a documented rollback plan is non-negotiable. Finally, avoid any schema changes until V5 is stabilized in pre-production.

2) Audit the ecosystem and custom code

List your plugins (official, marketplace, internal) and check their V5 compatibility on the Marketplace. Extensions relying on deprecated components (e.g. helper-plugin) will require an upgrade, functional replacement or redesign via the new Plugin SDK. At the same time, precisely map your customizations (controllers, services, middlewares, policies, lifecycles) to anticipate the impact of changes around the Document Service API and hooks.

3) Perform the tooled version upgrade

The version upgrade is managed on a dedicated branch or a pre-production environment as close as possible to production. The official tool carries out most of the upgrade (dependencies, code transformations), and should not be used “blindly”: each modification deserves a review.

4) Process the codemods… then complete by hand

Codemods automate part of the changes and mark the rest with TODO comments. Review them systematically: some relate to the Entity Service → Document Service migration, others to configuration changes (e.g. better-sqlite3, mysql2) or providers (e.g. S3 credentials). Keep a clean history (atomic commits, PRs reviewed by a senior) to facilitate a possible targeted rollback.

5) Finalize targeted adaptations

This is where the quality of the migration comes into play:

  • Resume lifecycles according to V5 logic (middlewares document) and check their actual triggering on your business paths.
  • Align your controllers/services with the Document Service API (read/write, relationships, pagination, filtering).
  • Update complex populations (notably on dynamic zones via the on flag) and take into account the introduction of the documentId in sensitive flows.
  • Validate changes around uploads and providers.
  • Clean up obsolete dependencies and align runtime environment (Node, DB drivers).

The principle: no transitional “tinkering” that would become debt; every deviation is addressed or planned.

6) Valider exhaustivement avant prod

Carry out a dedicated battery of tests: publication creation/editing with rights and i18n, data consistency, API calls (response contracts, errors, pagination), front-end integration tests (if applicable, you can temporarily use the V4 response backwards compatibility header while you align consumers), as well as smoke performance tests on critical endpoints. Add security (permissions, media exposure) and editorial quality (preview, versioning, workflows) checks.

7) Deploy and monitor

The transition to production is done on a controlled window, with application monitoring and database, ready indicators (latency, errors, build/admin time) and explicit criteria for triggering rollback. After switching, maintain a short freeze of pattern changes while confirming stability.

En suivant cette séquence: planifier, auditer, structurer, compléter, valider, déployer, vous transformez une montée de version majeure en véritable amélioration de votre socle : moins de complexité, de meilleures performances et une base éditoriale plus sûre. C’est l’exigence d’une migration premium

En suivant cette méthodologie: planifier, auditer, structurer, compléter, valider, déployer, vous transformez une montée de version majeure en véritable amélioration de votre socle : moins de complexité, de meilleures performances et une base éditoriale plus sûre. C’est l’exigence d’une migration premium

The developer's eye: feedback and professional advice

Quote - Free ui icons

What is striking about this V5 is the maturity that Strapi has taken.

On the dev side: The move to the Document Service API is a real plus. We gain in clarity, in consistency, and in robustness. Errors are easier to trace, and managing multilingual or versioned content becomes (finally) natural.

As for pitfalls: the real sticking point is mainly the plugins. Some are no longer maintained or do not yet exist for Strapi v5, which may force you to review part of your stack or develop your own alternatives. It requires a little adaptation, but in the end we gain consistency and sustainability in the long term.

Pro tip: Take advantage of the migration to overhaul what needed to be overhauled: clean custom controllers, review permissions, document customizations. Now is the time or never to start again on a healthy and scalable basis.

– Théodore, full-stack team lead

Conclusion and outlook: investing in the future with Strapi V5

Migrating to Strapi V5 amounts to investing in the sustainability and technical peace of mind of your stack. Of course, migration involves real preparation but it represents an essential step to take advantage of the new features, guarantee security and continue to develop your projects without hindrance.

If you would like to be supported on this path, whether for an audit, a roadmap, or a turnkey migration, the Smotly team is there for you. Do not hesitate to contact us for a discussion on your issues and your perspectives around Strapi.

Need a diagnosis or support? Contact us, we love talking Strapi over a coffee (virtual or not)!

Migrating from Strapi V4 to V5 is not a “one-click” operation. It is a change of base which requires serious technical framing and methodical execution.

Risk #1: Compatibility and ecosystem

The first risk is plugins. Not all are ported to V5 and some relied on now deprecated bricks (notably the helper-plugin). A prior audit is required: identify each extension (official, marketplace, internal), check its V5 version, decide on a case-by-case basis between update, functional replacement or redesign via the new SDK Plugin. The objective is twofold: secure the version upgrade and avoid incurring application debt.

Risk #2: Data, schematics and engines

V5 executes data migrations at first start, but several structuring developments require particular attention. The introduction of the documentId (which unifies versions and locales), the relationship adjustments, as well as the new population logic (notably on dynamic zones) may require targeted adaptations. On the engine side, certain stacks are no longer supported (for example, switching to better‑sqlite3 for SQLite, mysql2 for MySQL): it is necessary to validate the compatibility of the environment before** any cut‑over and provide a freezing window with a clear fallback plan (backups, tested restoration).

Risque n°3 : Code et personnalisations

The heart of the work is often here. The replacement of the Entity Service by the Document Service API, the rewriting of certain hooks (lifecycle) and the disappearance of historical helpers require a careful rereading of the overloads (controllers, services, middlewares, policies). The codemods automate part of the changes, but the final quality relies on a manual review: consistency of calls, behavior of hooks in new contexts, and verification of sensitive paths (creation/editing, rights, i18n).

In practice, a secure migration is prepared as a project in its own right: initial audit, functional batch strategy, pre-production environment as close as possible to production, non-regression tests (functional and performance) and proven rollback procedure. Thanks to this discipline, make your migration a lasting gain in robustness and maintainability.

F

Written by

Floriane

Smotly

Talk to the team
Live demo

Now, give us 30 minutes to convince you.

30 minutes. Zero slides. Your context. We show you concretely what SmotFlow changes for your project.