Skip to main content

Update to a newer Strapi version

🏗 Work in progress

The content of this page might not be fully up-to-date with Strapi 5 yet.

Strapi periodically releases code improvements through new versions. Updates contain no breaking changes. The present documentation is a generic update guide. The Updates and Migration introduction explains the differences between an update and a migration.

Caution

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

☑️ Prerequisites
  • Stop the server before starting the upgrade.
  • Confirm there are no migrations between the current and ultimate Strapi versions.
  1. Upgrade all of the Strapi packages version numbers in package.json to the latest stable Strapi version (Strapi stable versions are listed on the GitHub releases page):

    // 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"
    // ...
    }
    }

  2. Save the edited package.json file.

  3. Install the upgraded version:

    yarn
    💡 Tip

    If the operation doesn't work, try removing your yarn.lock or package-lock.json. If that doesn't help, remove the node_modules folder as well and try again.

Rebuild the application

Run the following command in your project root directory to rebuild Strapi's admin panel:

yarn build

Restart the application

Run the following command in your project root directory to restart the application:

yarn develop