Upgrade Strapi version
Strapi periodically releases code improvements through upgrades. Upgrades contain no breaking changes and are announced in both the terminal and in the administration panel. Migration guides are provided whenever a new Strapi version includes breaking changes.
Plugins extension that create custom code or modify existing code will need to be updated and compared to the changes in the repository. Not updating the plugin extensions could break the application.
Upgrade the dependencies
- Stop the server before starting the upgrade.
- Confirm there are no migrations between the current and ultimate Strapi versions.
Upgrade all of the Strapi packages version numbers in
package.json
to the latest stable Strapi version:// path: package.json
{
// ...
"dependencies": {
"@strapi/strapi": "4.7.0",
"@strapi/plugin-users-permissions": "4.7.0",
"@strapi/plugin-i18n": "4.7.0",
"better-sqlite3": "7.4.6"
// ...
}
}Save the edited
package.json
file.Install the upgraded version:
- yarn
- npm
yarn
npm install
tipIf the operation doesn't work, try removing your
yarn.lock
orpackage-lock.json
. If that doesn't help, remove thenode_modules
folder as well and try again.
Rebuild the application
Rebuild the administration panel:
Rebuilding the application
Run the following command in your project root directory:
- yarn
- npm
yarn build
npm run build
Start the application
Start the application and ensure that everything is working as expected:
Restarting the application
Run the following command in your project root directory:
- yarn
- npm
yarn develop
npm run develop