v4 code migration guide
Strapi v4 introduces breaking changes that require manually updating the codebase of an existing Strapi project.
This guide covers migrating both the backend and the frontend of a Strapi v3.6.x application to Strapi v4.0.x. and is built around small independent topics.
Migrating the backend code of a Strapi application is a prerequisite to migrating the frontend.
For each topic covered, this guide is designed to:
- help you understand the main differences between Strapi v3 and v4,
- help you resolve breaking changes by migrating built-in code to Strapi v4,
- and, whenever possible, offer some clues and starting points on how to migrate custom code.
The following topics are covered by this guide, and you can either click on a specific topic to jump to the dedicated migration documentation or click on a scope to read a more general introduction for the backend or the frontend migration:
Scope | Topic |
---|---|
Backend code migration | |
Frontend code migration |
The following topics are not extensively covered in this code migration guide, but Strapi v4 also introduces:
- a new file structure for the project, which can be migrated with the help of Strapi codemods,
- fully rewritten REST and GraphQL APIs, with the REST API not populating by default any relations, components, dynamic zones, and medias,
- the new Entity Service and Query Engine APIs,
- and the Strapi Design System which is used to build the new user interface of Strapi v4.