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.

Database

DescriptionAffects pluginsHandled by codemods
Content types always have feature columnsYesNo
MySQL v5 is not supported anymoreNoNo
Database identifiers longer than 55 characters will be automatically shortenedYes✅ 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 changedYes👷 Partly
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 removedYes👷 Partly
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
The getWhere method for permission provider instances has been removedYesNo

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
Database lifecycle hooks are triggered differently based on Document Service API methodsYesNo
The publishedAt parameter is not supported and replaced by statusYes✅ Yes
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
Some attributes and content-types names are reserved by StrapiYesNo
Upload a file at entry creation is no longer possibleYesNo
Components and dynamic zones should be populated using the detailed population strategyYesNo