Strapi v4 to Strapi 5 breaking changes
🚧 Work in progress
This page is a work-in-progress and the list of breaking changes is not 100% final yet.
This page lists all the breaking changes introduced in Strapi 5.
❗️ Warning
It is currently strongly advised that you refrain from migrating from Strapi v4 to Strapi 5, especially in a production environment.
The beta version of Strapi 5 is not meant to be used in production yet.
Configuration
- Some
env
-only configuration options are handled by the server configuration - Configuration filenames should meet strict requirements
- Server log level is
http
- Model config path uses uid instead of dot notation
- The
webhooks.populateRelations
server configuration is removed - The
defaultIndex
option is removed from thepublic
middleware
Content API
- Strapi 5 has a new, flattened response format for API calls
documentId
should be used instead ofid
in API calls- The
publicationState
parameter is not supported and replaced bystatus
- Sorting by id is no longer possible to sort by chronological order
- There is no
findPage()
method with the Document Service API - The
localizations
field does not exist anymore - Some attributes and content-types names are reserved by Strapi
- The GraphQL API has been updated
- The Entity Service API is deprecated and replaced by the Document Service API
- REST API input is validated by default in controllers
- Lifecycle hooks are triggered differently based on Document Service API methods
Database
- MySQL v5 is not supported anymore
- Database identifiers can't be longer than 55 characters
- Only the
better-sqlite3
package is supported for the SQLite client - Only the
mysql2
package is supported for the MySQL client
Plugins and providers
- Users & Permissions
register.allowedFields
defaults to[]
- The
helper-plugin
is deprecated injectContentManagerComponent()
is removed in favor ofgetPlugin('content-manager').injectComponent()
- Some Mailgun provider legacy variables are not supported
Strapi objects, methods, and packages
strapi.fetch
uses the nativefetch()
API- strapi factories import have changed
- The
isSupportedImage
method is removed in Strapi 5 strapi-utils
has been refactored- Core service methods use the Document Service API
Content Manager
- The
ContentManagerAppState
redux is modified - The
EditViewLayout
andListViewLayout
have been refactored - The Admin Panel RBAC redux store has been updated
Dependencies
- Vite is the default bundler in Strapi 5
- Strapi 5 uses
react-router-dom
v6 - Strapi 5 uses
koa-body
v6 - Webpack Aliases are removed in Strapi 5
- Apollo Server v3 upgraded to Apollo Server v4
Internal changes
The following changes should only affect users who deeply customize Strapi.