Skip to main content

Strapi v4 to Strapi 5 breaking changes

The present page lists all the breaking changes introduced in Strapi 5. Breaking changes are grouped into topic-related categories, and for each line in the following tables line you will find:

  • a short description of the breaking change,
  • and 2 other columns, "Affects plugins" and "Handled by codemods", that sum up whether the breaking change also affects plugins and whether the breaking change is automatically handled by a codemod from the upgrade CLI tool.

You can click on the description of any breaking change in the following tables to jump to the corresponding page with more details.

πŸ’‘ Tips
  • To view a full list of available codemods, run the npx @strapi/upgrade codemods ls command in your terminal.
  • To have a deeper look at the code executed by the codemods, head over to the list of codemods in the GitHub repository.
❗️ Warning: Strapi 5 is not stable yet

It is strongly advised not to upgrade a critical or production-ready project from Strapi v4 to Strapi 5.

The content of migration resources might not be final yet. Migration resources are currently only provided to prepare you for the upgrade to Strapi 5 when it is released as a stable version.

Strapi 5 is currently only provided as a Release Candidate (RC) version and is not meant to be used in production yet.

Database​

DescriptionAffects pluginsHandled by codemods
MySQL v5 is not supported anymoreNoNo
Database identifiers can't be longer than 55 charactersYesβœ… Yes
Only the better-sqlite3 package is supported for the SQLite clientNoβœ… Yes
Only the mysql2 package is supported for the MySQL clientNoβœ… Yes

Dependencies​

DescriptionAffects pluginsHandled by codemods
The CLI default package manager is not yarn anymoreNoNo
Vite is the default bundler in Strapi 5YesNo
Strapi 5 uses react-router-dom v6Yesβœ… Yes
Strapi 5 uses koa-body v6YesNo
Webpack aliases are removed in Strapi 5YesNo
Apollo Server v3 upgraded to Apollo Server v4YesNo

Configuration​

DescriptionAffects pluginsHandled by codemods
Some env-only configuration options are handled by the server configurationNoNo
Configuration filenames should meet strict requirementsNoNo
Server log level is httpNoNo
Model config path uses uid instead of dot notationYesπŸ‘· Partly
The webhooks.populateRelations server configuration is removedYesNo
The defaultIndex option is removed from the public middlewareNoNo
Server proxy configuration options are grouped under the server.proxy objectNoNo

Strapi objects, methods, packages, and back-end customization​

DescriptionAffects pluginsHandled by codemods
strapi.fetch uses the native fetch() APIYesNo
strapi factories import have changedYesNo
The isSupportedImage method is removed in Strapi 5YesNo
strapi-utils has been refactoredYesβœ… Yes
Core service methods use the Document Service APIYesNo
i18n is now part of the strapi coreYesβœ… Yes

Plugins, providers, and admin panel customization​

DescriptionAffects pluginsHandled by codemods
Users & Permissions register.allowedFields defaults to []Noβœ… Yes
The helper-plugin is deprecatedYesNo
injectContentManagerComponent() is removed in favor of getPlugin('content-manager').injectComponent()YesNo
Some Mailgun provider legacy variables are not supportedYesNo
The lockIcon property has been replaced by licenseOnlyYesNo
The ContentManagerAppState redux is modifiedYesNo
The EditViewLayout and ListViewLayout have been refactoredYesNo
The Admin Panel RBAC redux store has been updatedYesNo

Content API​

DescriptionAffects pluginsHandled by codemods
Strapi 5 has a new, flattened response format for API callsYesNo
REST API input is validated by default in controllersYesNo
The GraphQL API has been updatedYesNo
The Entity Service API is deprecated and replaced by the Document Service APIYesπŸ‘· Partly
documentId should be used instead of id in API callsYesπŸ‘· Partly
Lifecycle hooks are triggered differently based on Document Service API methodsYesNo
The publicationState parameter is not supported and replaced by statusYesβœ… Yes
Sorting by id is no longer possible to sort by chronological orderYesβœ… Yes
There is no findPage() method with the Document Service APIYesNo
The localizations field does not exist anymoreYesNo
Some attributes and content-types names are reserved by StrapiYesNo