Step-by-step guide to upgrade to Strapi 5
The latest major version of Strapi is Strapi 5.
The present page is meant to be used as step-by-step instructions for upgrading your Strapi v4 application to Strapi 5.
Prerequisites
Your Strapi v4 application is already running on the latest v4 minor and patch version. If it's not, run the upgrade tool with the minor
command to reach it: npx @strapi/upgrade minor
.
Step 1: Get ready to upgrade
Before getting into the upgrade process itself, take the following precautions:
- Backup your database:
- If you are using SQLite with the default configuration (the default database provided with Strapi), your database file is named
data.db
and is located in the.tmp/
folder at the root of your Strapi application. - If you are using another type of database, please refer to their official documentation (see PostgreSQL docs and MySQL docs).
- If your project is hosted on Strapi Cloud, you can manually create a backup.
- If you are using SQLite with the default configuration (the default database provided with Strapi), your database file is named
- Backup your code:
- If your code is versioned with git, create a new dedicated branch to run the migration.
- If your code is not versioned with git, create a backup of your working Strapi v4 code and store it in a safe place.
- Ensure the plugins you are using are compatible with Strapi 5.
To do so, list the plugins you are using, then check compatibility for each of them by reading their dedicated documentation on the Marketplace website.