Additional resources for migrating to Strapi 5
The following pages cover some dedicated topics for specific use cases when upgrading to Strapi 5. Please ensure you have read the introduction to upgrading to Strapi 5 and step-by-step guide before moving forward.
Apollo Server v3 upgraded to Apollo Server v4
The upgrade from Apollo Server v3 to v4 and graphql ^15 to ^16.
Breaking changes
View the list of all breaking changes introduced between Strapi v4 and v5.
Components and dynamic zones do not return an id
In Strapi 5, components and dynamic zones do not return an `id` with REST API requests so it's not possible to partially update them.
Content types with Draft & Publish disabled always have the publishedAt value set to a date
In Strapi 5, content-types with Draft & Publish disabled always have the publishedAt value set to a date.
Core service methods use the Document Service API
In Strapi 5, core service methods use the Document Service API instead of the Entity Service API.
Database columns
Content types always have feature columns
Database identifiers shortened in v5
Database identifiers are shortened in Strapi v5 and can't be longer than 55 characters to avoid issues with identifiers that are too long.
Database lifecycle hooks are triggered differently with the Document Service API methods
In Strapi 5, database lifecycle hooks are triggered differently with the various Document Service API methods.
defaultIndex removed
In Strapi 5, the 'defaultIndex' option is removed from the 'public' middleware.
documentId should be used instead of id in API calls
Documents should be called by their documentId in Content API calls (REST API & GraphQL).
Entity Service deprecated
In Strapi 5, the Entity Service API is deprecated in favor of the new Document Service API.
From Entity Service API to Document Service API
Learn how to transition from the Entity Service API of Strapi v4 to the Document Service API in Strapi 5
Helper-plugin migration reference
Learn how to migrate your Strapi plugins and applications to not use the `helper-plugin` package.
helper-plugin removed
In Strapi 5, the `helper-plugin` is removed. A whole migration reference is available for plugin developers, and codemods will automatically handle some changes.
injectContentManagerComponent() removed
In Strapi 5, the Content Manager is a plugin, which affects the injectContentManagerComponent() method, replaced by getPlugin('content-manager').injectComponent().
Internationalization (i18n) is now part of the strapi core
Internationalization (i18n) is now part of the Strapi core and no longer a plugin, and this impacts how the locale parameter is sent and accessed.
locale=all can not be used to query all locales
In Strapi 5, it's no longer possible to get all localized versions with the '?locale=all' parameter.
lockIcon replaced by licenseOnly
In Strapi 5, the lockIcon property is replaced by licenseOnly, which affects how the addMenuLink(), addSettingsLink(), and addSettingsLinks() methods from the Admin Panel API work.
Model config path uses uid instead of dot notation
Modules like `api::myapi` and `plugin::upload` should no longer be accessed in the Strapi config using `api.myapi` and `plugin.upload`, but instead using `api::myapi` and `plugin::upload`.
MySQL v5 unsupported
MySQL v5 is not supported in Strapi v5 anymore.
No findPage() in Document Service API
In Strapi 5, the Entity Service API is deprecated, and for the findPage() method you should use the Document Service API's findMany() method instead.
No shared population strategy for components & dynamic zones
In Strapi 5, the shared population strategy is not supported anymore, so components and dynamic zones must be explicitly populated using `on` fragments.
Only the `better-sqlite3` package is supported for the SQLite client
In Strapi 5, users can only use the `better-sqlite3` package for SQLite databases, and the `client` value for it must be set to `sqlite`.
Only the mysql2 package is supported for the MySQL client
In Strapi 5, only the mysql2 package is supported for MySQL databases.
Plugins upgrade summary
The present page is intended to be used as a short summary of everything to consider if you are a plugin developer upgrading your plugin from Strapi v4 to Strapi 5. The page quickly describes the changes affecting plugins and links to additional resources where necessary.
publicationState is removed and replaced by status
In Strapi 5, 'publicationState' can no longer be used in Content API calls. The new status parameter can be used and accepts 2 different values, draft and published.
publishedAt can't be used anymore to define the status
In Strapi 5, 'publishedAt' can no longer be used in Content API calls to set the status. The new status parameter can be used and accepts 2 different values, draft and published.
Reserved attributes and content-types names
In Strapi 5, some attributes and content types names are reserved, and all fields or content types using the reserved names should be renamed before migrating to prevent data loss.
REST API input is validated by default in controllers
In Strapi 5, REST API input is validated by default in controllers, instead of accepting invalid data and sanitizing it silently.
Server log level is `http`
The default log level of the middleware logger in Strapi 5 is 'http'.
Server proxy configuration
In Strapi 5, all proxy configuration options are now configured through the 'server.proxy' object in the '/config/server.js|ts' instead of having various option names such as 'globalProxy' and 'proxy' in Strapi v4.
Some env-only configuration options are handled by the server configuration
In Strapi 5, some env-only configuration options are handled by the server configuration
Some Mailgun provider legacy variables are not supported
In Strapi 5, some variables have been renamed for the Mailgun provider options, dropping support for some legacy variables that were deprecated in Strapi v4.
Sorting by id is no longer possible to sort by chronological order
In Strapi 5, sorting by id is no longer possible to sort by chronological order, and you should use createdAt instead.
Step-by-step guide to upgrade to Strapi 5
Follow this step-by-step guide to upgrade from Strapi v4 to Strapi 5
Strapi 5 has a new, flattened response format for API calls
In Strapi 5, the response format has been simplified and flattened, and attributes of requested content are no longer wrapped in an attributes object.
Strapi 5 uses koa-body v6
Strapi 5 uses koa-body v6, which updates node formidable to v2.
Strapi 5 uses React Router DOM 6
Strapi 5 uses react-router-dom v6. This impacts the links added to Global Settings or to the Menu using the Admin Panel API.
Strapi factories import have been updated
In Strapi 5, the way import are done, through the application init function or through factories, has been updated.
Strapi is a subclass of Container
In Strapi 5, container methods can be accessed directly from the strapi class.
strapi-utils is refactored
In Strapi 5, the 'strapi-utils' core package has been refactored. This page lists the additions, removals, and other updates.
strapi.fetch uses native fetch() API
In Strapi 5, the `strapi.fetch` object is now wrapping node Fetch API instead of node-fetch.
Strict requirements for configuration filenames
Strapi 5 has strict requirements on the configuration filenames allowed to be loaded.
Templates are now regular, standalone Strapi applications
Templates have been fully rewritten in Strapi 5 and now are standalone, regular Strapi applications, making it easier to create, distribute, and re-use them.
The 'webhooks.populateRelations' server configuration is removed
In Strapi 5, webhooks have been refactored and the `webhook.populateRelations` option will become redundant. This might affect lifecycles expecting the returned relations of create, update and delete to be populated.
The `EditViewLayout` and `ListViewLayout` have been rewritten
In Strapi 5, some admin panel hooks have been removed from the Redux store and a new `useDocumentLayout` hook is introduced.
The admin panel RBAC system has been updated
In Strapi 5, there is no `content-manager_rbacManager` anymore, and the regular permissions system is used instead.
The CLI default package manager is not yarn anymore
Strapi 5 detects what package manager you are using to run the CLI, and uses this package manager to install dependencies.
The ContentManagerAppState redux is modified
In Strapi 5, the redux store for the Content Manager has been changed and some redux actions were removed.
The getWhere() method for permission provider instances has been removed
In Strapi 5, the getWhere() for permission provider instances has been removed, and users should use provider.values().filter() to replace it.
The GraphQL API has been updated
In Strapi 5, the GraphQL API has been updated. It handles the new, flattened response format, and can also now accept Relay-style queries.
The isSupportedImage method is removed in Strapi 5
The `isSupportedImage` method is removed in Strapi 5. Users should use `isImage` or `isOptimizableImage` instead.
The Users & Permissions plugin's register.allowedFields configuration option defaults to []
In Strapi 5, The Users & Permissions plugin's `register.allowedFields` configuration option defaults to [].
Upgrading to Strapi 5 - Introduction and FAQ
Learn more about how to upgrade to Strapi 5
Upload a file at entry creation no longer supported
In Strapi 5, it is not possible to upload a file while creating an entry, so users must upload the file first, and then create the entry with the created file id.
Vite is the default bundler
In Strapi 5, Vite is the default bundler and replaces webpack.
Webpack Aliases are removed
A simplified approach of aliasing in Strapi v5.