Strapi v4 to v5 migration

Strapi v4 reached end of life on April 30, 2026, so teams still running it need a planned Strapi v4 to v5 migration with a backed-up database and a tested rollback. This page explains what the work covers, what drives cost and duration, and when a partner is worth it.

On this page

Why teams plan a Strapi v4 to v5 migration now

If your self-hosted Strapi v4 project is still running, it is past end of life. Strapi v4 reached end of life on April 30, 2026, and its final release, 4.26.2 of June 9, 2026, will receive no further updates. The right response is a planned migration to Strapi 5 using the upgrade tool, codemods and data migration scripts, not an in-place patch of v4. Most teams with a customized project should expect a partner to share the work, because the Document Service API change and plugin compatibility checks touch custom code, but a team with a small, standard content model may handle it in-house if it has the time and a tested rollback plan.

The first trigger is security exposure. Once v4 receives no updates, any vulnerability disclosed in the framework or its dependencies stays open in your environment, and your team must patch around it. The second trigger is plugin support. Each plugin you rely on, including any custom plugins, needs a Strapi 5 version or a replacement, and some may not have one. Confirm the status of every plugin in your package.json before you commit to a date. The third trigger is capability. Strapi 5 changes the API response format and adds features your content team may want, but the business case should rest on the specific features you need, not on the release itself.

Start with an inventory that checks Node.js and database versions against the Strapi 5 installation requirements, lists every custom controller, service and lifecycle hook, and records which front ends consume the API and how. Ask any partner to show how they will verify the rollback path, since Strapi's documentation says downgrading is not supported and the database backup is your only way back. Read the Strapi v4 to v5 migration introduction and FAQ before you scope the work.

What a Strapi v4 to v5 migration includes

A v4 to v5 move touches the code, the data, the plugins and the front end at once, so the work is split into parallel packages that meet at a single test cycle. Each package ends in a named deliverable the client keeps, so the scope can be checked against outputs rather than effort alone.

Project assessment and inventory

Before any upgrade command runs, the team inventories custom controllers, services, lifecycle hooks, schema definitions, installed plugins and the environments that use them. The inventory records which v4 APIs each file calls and which plugins lack a Strapi 5 release. Ask for the inventory as a written document with a risk rating per item, since it drives the duration and cost of every other package.

Migration FAQ

Upgrade tool and codemod runs

Strapi provides an upgrade tool with codemods that rewrite many v4 patterns to v5 equivalents. The team runs them on a branch, reviews every changed file, and records what the codemods could not handle. Ask for a migrated branch with a commit history that separates automated changes from manual edits, so reviewers can trace each rewrite.

Document Service API refactoring

Strapi 5 replaces the Entity Service API with the Document Service API, which changes how custom code reads and writes content. Every custom query, lifecycle hook and service method is rewritten and then tested against draft and published states. The main risk is silent behavior change in code that still runs without errors. Ask for a list of refactored functions and the test cases that cover each one.

Migration FAQ

Plugin compatibility decisions

Each installed plugin is kept, replaced, patched or removed, with the decision recorded against the plugin's Strapi 5 status at the time of the audit. Community plugins without a v5 release need a replacement plan or a fork owned by the client. Ask for a decision register that names the owner of each plugin after go-live, because unmaintained plugins become the largest later cost.

Front-end response format handling

Strapi 5 changes the API response format, and the Strapi-Response-Format: v4 header can keep older clients working during the transition. The team decides whether each consumer moves to the new format or stays on the header, then tests every front end and mobile app against staging. Ask for a consumer matrix that lists each client, its response format and its owner.

Data migration with tested rollback

Strapi 5 runs data migration scripts on first start, and downgrading is not supported, so the database backup is the only rollback path. The team rehearses the migration on a copy of production, measures the restore procedure, and documents the cutover order. Ask for a runbook with backup verification steps, a restore test log and a go or no-go checklist for the production window.

Migration FAQ

What drives the cost and duration of a Strapi migration

This table lists the factors that move a Strapi v4 to v5 migration up or down in effort, why each one matters, and one practical way to reduce it. Use it to scope a quote and to decide where your team should invest before the work starts.

DriverWhy it adds effortHow to reduce it
Content types and componentsEach content type and component needs schema review, and the data migration must map every field and relation to the Strapi 5 structure.Audit the schema first, remove unused types and fields, and confirm the field list before the migration plan is written.
Custom controllers, services and lifecycle hooksCode that calls the Entity Service API must be rewritten to the Document Service API, and response shapes change for every consumer.Inventory every call site with a search, then group them by pattern so the rewrite follows a small number of tested templates.
Community and custom pluginsEach plugin needs a Strapi 5 compatible version or a replacement, and custom plugins need code changes and their own tests.List installed plugins with their v5 status early, and drop or replace plugins that are no longer maintained before the upgrade starts.
Number of front ends and API consumersEvery client that reads the API may depend on the v4 response format, so each one needs testing or a compatibility plan.Map every consumer and its owner, and use the Strapi-Response-Format v4 header as a bridge while each front end is updated.
Database size and media volumeLarger databases take longer to back up, migrate and verify, and large media libraries add storage checks and rollback time.Clean up stale entries and unused uploads before the migration, and measure a full copy restore in a staging environment.
Number of environmentsEach environment such as development, staging and production needs its own run, verification and sign-off.Run the migration once in a disposable copy of production, then reuse the same scripted steps in every other environment.
Edition and features in useEnterprise or Growth features such as SSO, audit logs, review workflows or content history add configuration and testing beyond the Community setup.Confirm which paid features are active on the current plan and confirm their Strapi 5 behavior with the vendor before scoping.
Compliance evidence needsAssessors may ask for change records, backup proof, test results and rollback evidence, which takes time to collect and file.Agree the evidence list before work starts and capture test output and backup records as the migration runs, not afterward.

The migration runs on a staging copy, and rollback restores the pre-upgrade backup

The diagram starts with freezing the v4 project and backing up its database and uploads, then moves a clone to staging where the upgrade tool and codemods run. The key hand-off is the first start of Strapi 5, when data migration scripts change the stored data, so the backup must exist before that step. Each front end is tested with and without the Strrapi-Response-Format: v4 header, and a failed go decision restores from the backup, because downgrading in place is not supported.

Migration sequence on staging, with rollback restoring the pre-upgrade backup.

The phases of a Strapi 5 upgrade project and what each delivers

The sequence moves a Strapi v4 project to Strapi 5 in controlled stages, so each phase ends with a recorded output that the next phase depends on. Production changes happen only after the upgrade, remediation and regression work has been proven on a copy.

  1. Discover and inventory the v4 project

    The team lists content types, components, custom controllers, services, lifecycle hooks, plugins, custom admin panel code, middlewares, API tokens, Users and Permissions roles, and every front end or system that calls the API. The engineers also record which code lives under the project's src directory and which plugins are installed, because each one needs a compatibility decision later. The output is a written inventory with a named owner for each consumer. The phase is complete when the inventory has been reviewed against the running production instance, not only the codebase.

  2. Check Node.js and environment requirements

    Engineers confirm that the Node.js version used by the project and its hosts is an Active or Maintenance LTS release, as Strapi 5 supports only those. They also check the build tooling, container images, CI runners and process managers that touch the application. The output is a compatibility record listing the target Node.js version and any host or image changes required. Confirm the current LTS status against the official Node.js release schedule before setting the target, since LTS status changes over time.

  3. Verify the database version and engine

    The team confirms the production database engine and version against the Strapi 5 installation requirements: PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later, or SQLite 3. MongoDB and other NoSQL databases are not supported, so a project on one of them needs a database migration plan before the upgrade can begin. The output is a signed-off database target and, where the version is below the minimum, an upgrade or migration task that is scheduled ahead of the Strapi work. The phase closes when the database version is confirmed on the actual production host.

  4. Run the upgrade in a staging copy

    Engineers restore a recent copy of the production database and uploads into a staging environment, then run the Strapi upgrade tool and its codemods against the project source in version control. They start Strapi 5 so the data migration scripts run on first start, and they review the changes the tool made to schema files, configuration and code. The output is a staging instance that boots on Strapi 5 with a migration log and a reviewed diff. Before any of this, the database backup is taken, because Strapi's documentation states that downgrading is not supported.

  5. Remediate code and plugins

    Developers work through the breaking changes list, replacing Entity Service calls with Document Service API calls in custom controllers, services and lifecycle hooks. They confirm that each installed plugin has a Strapi 5 compatible release or replace it, and they update custom admin panel code and any server code that depends on the v4 response shape. Where front ends need time to adapt, the team can use the Strapi-Response-Format: v4 header during migration. The output is a passing build, a list of removed or replaced plugins, and a documented decision for each deferred item.

  6. Regress the API and front ends

    QA and developers test every consumer from the inventory against the staging Strapi 5 instance. They check response shapes, pagination, relations, populate queries, media URLs, authentication and permission results for public and authenticated roles, and preview or webhook flows. Each front end is tested with its own build, not only the API in isolation. The output is a signed regression report with each failure either fixed or accepted in writing by the consumer's owner. Ask the partner to show which test cases cover each consumer from the inventory.

  7. Rehearse cutover and rollback

    The team runs the full production cutover sequence on a separate copy at least once: freeze content writes, take and verify the database and upload backups, run the upgrade, start Strapi 5, run smoke tests and time the steps. They also rehearse the rollback path, which restores the v4 code, the v4 Node.js runtime and the pre-upgrade backup, because a downgrade of the database is not supported. The output is a runbook with named steps, a go or no-go checklist and a recorded rollback test. The phase closes only when the rollback has been executed successfully, not just described.

  8. Go live and hand over

    The team executes the rehearsed cutover in the production window, runs the smoke tests against live consumers and watches logs, error rates and migration output for an agreed period. After go-live, they hand over the updated inventory, runbooks, plugin decisions, test suite and ownership map to the client's engineering team, and they confirm the post-launch support arrangement in writing. The output is a live Strapi 5 instance, a signed handover pack and a closed list of open issues. The phase is complete when the client's owners accept the handover.

How data migration and a tested rollback protect the content

The risky moment in a Strapi v4 to v5 move is the first boot of Strapi 5 against production data. Strapi 5 runs data migration scripts on first start, so the database changes as soon as the new version runs. Treat that first start as a one-way step unless you have a verified backup in hand. The Strapi migration docs say to back up the database first because downgrading is not supported, and that single instruction shapes the whole cutover plan. Take the backup immediately before the upgrade window, not a day earlier, so it reflects the content that will actually be migrated, and confirm you can restore it into an empty database before you rely on it.

Rollback therefore means restoring three things together: the database backup, the Strapi v4 code at the version you ran before (4.26.2 was the final v4 release), and the uploads directory or upload provider state that the database references. Restoring only the database produces a mismatch between content records and files. Record the exact code commit, the Node.js version, the environment configuration and the storage location of the media files before you start, so the rollback target is reproducible. Ask your partner or internal team to show a restore of all three into a clean environment as part of the plan, not as an assumption.

Rehearse the full cutover on a copy of production before the real window. The rehearsal should run the upgrade tool and codemods, the data migration on first start, and the restore path, timing each step and logging every manual action. After the migration, check content counts per content type against the v4 database, spot-check relations between entries, and confirm that draft and published states carried over correctly for entries that had both versions. Verify that media links resolve, that files open, and that front-end requests return the response shape your application expects, including any use of the Strapi-Response-Format: v4 header during transition. Compare these results with your acceptance criteria before approving the production run.

What usually goes wrong in a Strapi v4 to v5 migration

Most failed Strapi upgrades are not caused by the upgrade tool itself. They come from code and plugins that were never inventoried, front ends that assumed the old response shape, and cutovers that were never rehearsed. Each risk below has a prevention step and an owner, and the team should assign both before the migration branch is created.

Custom code still calling Entity Service

Custom controllers, services and lifecycle hooks written for v4 often call the Entity Service API, which Strapi 5 replaces with the Document Service API. The codemods cover many standard patterns, but hand-written calls in custom code are not guaranteed to be rewritten. Prevention: search the codebase for Entity Service calls and list every custom file that touches the database layer, then rewrite and test each one against a copy of production data. Owner: the backend developer who wrote the custom code, reviewed by the tech lead.

Migration docs

Plugins without a Strapi 5 release

A plugin that has no Strapi 5 release, or that behaves differently in Strapi 5, can block the upgrade or change content behavior without any visible error at build time. Prevention: build a plugin inventory with each plugin's current version, its Strapi 5 status and its maintainer activity, then decide for each one to upgrade, replace or remove it. Test every plugin's admin screens and API endpoints after the upgrade. Owner: the platform lead signs off on each decision, and the developer who installed each plugin verifies it.

Front ends that break on response format

Strapi 5 changes the API response format. Front ends built for v4 can fail silently, showing empty fields or wrong relations instead of raising errors. The Strapi-Response-Format: v4 header can keep older clients working during migration, but it is a transition tool, not a long-term design. Prevention: list every consumer of the API, including mobile apps and scheduled jobs, and run each one against a staging instance before cutover. Owner: the front-end lead for each consumer.

Unverified backups and no real rollback

Strapi's guidance is to back up the database before migrating because downgrading is not supported. A backup that has never been restored is not a rollback plan. Prevention: take a database backup, restore it to a separate environment, confirm the content counts and media references match, and record how long the restore takes. Keep uploads backed up alongside the database. Owner: the infrastructure or database engineer, with sign-off from the project owner who accepts the rollback window.

Node.js version mismatch

Strapi 5 runs only on Active or Maintenance LTS Node.js versions. Teams that upgrade Strapi but leave an older Node.js runtime in their build images, CI runners or hosting platform will hit startup or build failures that look like application bugs. Prevention: confirm the required Node.js version against the installation requirements, pin it in the project and in every build and deployment image, and check the version in staging before the migration branch is merged. Owner: the DevOps engineer who manages build pipelines.

Installation requirements

Rushed cutover without rehearsal

A migration done once in production, under deadline pressure, leaves no room to fix data migration issues found on first start of Strapi 5. Prevention: run the full sequence (backup, upgrade tool, codemods, data migration, smoke tests, rollback) at least once against a production-sized copy, record every manual step and time the run. Set a go or no-go checklist before the cutover window. Owner: the migration lead, who runs the rehearsal and holds the go or no-go decision.

Which migration parts teams keep in-house and which they outsource

Content owners and product owners hold the decisions that only the business can make. Content owners check that migrated entries, relations, media and localized fields display correctly in the admin panel and on the front end. Product owners approve which features move to Strapi 5 as is, which are retired, and when the cutover window opens. Neither role needs deep Node.js knowledge, but both need a clear test checklist and access to a staging copy.

  • Content verification: Sample entries in each content type after the data migration and compare them with the v4 copy, including drafts, relations and localized versions.
  • Scope decisions: Decide which content types, custom fields and unused features stay, change or go before the work starts.
  • Cutover window: Choose the freeze period for content editing and agree who can approve a go or no-go call.
  • Editor training: Document changes to the admin panel that editors will notice, such as the reworked content manager and draft and publish behavior.
  • Acceptance sign-off: Name the people who accept the staging result in writing, since they carry the business risk of the cutover.

Check that each named person has time booked during the rehearsal and cutover, not only during planning.

What a Strapi 5 project costs to run after the migration

This table compares the recurring cost components that start at go-live, from self-hosting and backups to upgrades and edition choices. Use it to see which costs are fixed by your plan choice and which depend on your own infrastructure and staffing. The main takeaway is that the Community license is free, but hosting, upgrades and skills are paid for by your organization or a partner whichever edition you choose.

Cost componentWho is paidOne-time or recurringWhat drives it
Self-hosting infrastructure and managed databaseYour cloud provider or data center teamRecurringInstance count, database size, high availability design and region. Confirm supported PostgreSQL, MySQL or MariaDB versions with Strapi before sizing.
Backups and media storageYour cloud provider or storage vendorRecurringDatabase dump frequency, retention period and upload volume. Strapi advises a database backup before any migration step.
Frequent Strapi 5 minor upgradesYour internal team or a support partnerRecurringStrapi 5 minors ship roughly weekly, so the upgrade cadence you choose sets the staff time. Plan a regular test cycle in staging.
Node.js LTS changesYour internal team or a support partnerRecurringStrapi runs only on Active or Maintenance LTS Node.js versions, so each LTS transition requires a compatibility test.
Plugin and dependency updatesYour internal team or a support partnerRecurringNumber of community and custom plugins, and whether each one has been updated for Strapi 5.
Community edition licenseNo license feeRecurring at zero license costCommunity is free with unlimited users, but SSO, audit logs and review workflows are not part of it.
Growth edition (self-hosted)Strapi Solutions SASRecurringListed at 45 US dollars per month including 3 users, plus 15 dollars per extra user, per Strapi's self-hosted pricing page. SSO is an add-on on this plan.
Enterprise edition (self-hosted)Strapi Solutions SASRecurring, custom pricedQuoted by Strapi. Audit logs and review workflows are Enterprise features, so ask for them in the quote if your controls need them.
Strapi Cloud (alternative to self-hosting)Strapi Solutions SASRecurringListed at 35, 90 and 450 US dollars per month per project for Starter, Pro and Business. Confirm current prices with Strapi before budgeting.

What the client needs to provide before a migration starts

Before a migration starts, the client needs to hand over access and facts that the team cannot reliably guess. The first items are the v4 codebase, its repository history, the CI pipeline that builds and deploys it, and read access to the staging and production databases and upload storage. Without the repository and pipeline, the upgrade tool and codemods cannot be run against the real project, and the team ends up reconstructing the build from a running server. Without a copy of the production database and upload storage, the data migration that runs on first start of Strapi 5 can only be tested against sample content, which hides the edge cases that cause cutover delays. Ask for a current database backup policy in writing, including where backups are kept and how long a restore takes, because the Strapi migration docs say to back up the database first and downgrading is not supported (see the Strapi v4 to v5 migration introduction and FAQ).

The client should also provide an inventory of installed plugins with exact versions, every front end and API consumer that calls Strapi, and the request formats those consumers depend on. Plugin versions determine which ones have a Strapi 5 release and which must be replaced or removed, so a missing list turns plugin compatibility into a discovery exercise during the migration window. Front ends matter because Strapi 5 changes the API response format, and the Strapi-Response-Format: v4 header is a temporary bridge, not a finished fix. If the consumers are not listed, the team cannot tell which ones need changes, which ones can be moved behind the header, and which must be tested before cutover. Ask the client to confirm the Node.js version in use, because Strapi 5 runs only on Active or Maintenance LTS Node.js versions and that check is part of the first build.

Name one owner each for content, product and operations, and agree a change window for cutover with a rollback decision point. Owners resolve questions about which content types, roles and public endpoints are still needed, and they sign off on test results. Operations decides how the rollback runs if the data migration fails. The client also needs to decide early on two things that change scope: plugin replacements and edition needs. If admin login must go through an identity provider, the SSO feature is an add-on on the Growth plan or included in Enterprise, and audit logs and review workflows are Enterprise features (see the Strapi self-hosted pricing page). Those decisions should be made before the migration starts, because a late edition change alters the license, the cost and the test plan.

Questions buyers ask about Strapi v4 to v5 migration

How much does a Strapi v4 to v5 migration cost?

The cost depends on the size and shape of your project, not on a published migration fee, because no price for this work is supplied in the sources we rely on. The main drivers are the number of content types and components, how many custom controllers, services, lifecycle hooks and plugins call the v4 Entity Service API, how many front ends consume the API, and the volume of data that must move. Costs fall into one-time items (assessment, code changes, data migration, testing, rollback rehearsal, cutover) and recurring items (hosting, database, Node.js upkeep, plugin updates). Ask any partner for a quote built from a written scope that lists each of these items separately, and ask what is excluded, such as front-end rewrites or plugin replacements.

How long does a Strapi v4 to v5 upgrade take?

Duration is set by the amount of custom code, the number of plugins that need a new version or replacement, the number of front ends to retest, and how many environments you must rehearse through before production. Strapi v4 reached end of life on April 30, 2026, and its final release, 4.26.2 of June 9, 2026, will receive no further updates, so the work has a clear deadline pressure. Strapi 5 minor releases have shipped roughly weekly, with v5.58.0 published on October 14, 2026, so plan to pin a specific version during the project and schedule a separate upgrade cycle afterward. Ask for a timeline that shows assessment, a staging rehearsal, a rollback test and a cutover window as separate milestones.

Can our team migrate Strapi with the upgrade tool alone?

Your team can start with the upgrade tool and its codemods, which Strapi provides for moving from v4 to v5, but the tool does not rewrite custom business logic. Codemods handle common, mechanical changes, while your own controllers, services and queries that call the Entity Service API must be reviewed and rewritten for the Document Service API. Teams with a small, standard project and strong Node.js and database skills can often do this in-house. Teams with heavy customization, many plugins, or compliance obligations usually gain more from an outside review. Confirm with Strapi's breaking changes list which items apply to your project before deciding.

What does the migration need from our own staff?

Plan for named owners rather than a general request for help. You will need a developer who knows the current codebase, someone who owns the database and backups, a person who can approve content model and API response changes, and a front-end owner who can retest every consumer of the API. Someone with authority over DNS, hosting, secrets and deployment must also be available for the cutover window. Business owners should sign off on content that must survive the move and on any downtime. Ask your partner to list the staff hours and decisions they expect from you in the written scope.

Can we downgrade to Strapi v4 if the upgrade fails?

Strapi's migration documentation says downgrading is not supported, so a rollback to v4 depends on a backup you can restore, not on reverting the software. Back up the database before running the data migration scripts, which run on the first start of Strapi 5. Keep the v4 code, lockfile, environment configuration and uploaded media from the same point so you can run the old stack against the old data. Test the restore in a separate environment before cutover, and time how long it takes. Confirm the rollback steps with Strapi's documentation and your own hosting provider, because the restore window and any content written after the backup must be agreed in advance.

Do our front ends have to change after the upgrade?

Yes, usually. Strapi 5 replaces the Entity Service API with the Document Service API and changes the API response format. Strapi provides a Strapi-Response-Format: v4 header for backward compatibility during migration, which can let existing front ends keep working while you move them over. Treat that header as a bridge, not a permanent design choice, and confirm how long it is supported with Strapi. Each front end, whether it uses REST, GraphQL, a mobile app or a static site generator, needs a regression test against the new responses, including preview and cache revalidation flows.

What happens to plugins that do not work with Strapi 5?

A plugin that does not support Strapi 5 blocks the upgrade until you find a supported version, a maintained replacement or a custom rewrite. Start with an inventory of every installed plugin, its current version and its maintainer, then check each plugin's release notes and repository for Strapi 5 support. Abandoned plugins carry security and compatibility risk, so a replacement may be safer than forcing an old version to run. Plugins you built yourself must be reviewed against the Document Service API. Confirm each plugin's Strapi 5 status directly with its author, and record the decision for each one in the migration plan.

How DeployOpen scopes, delivers and hands over a Strapi migration

DeployOpen plans, implements, tests, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and a Strapi v4 to v5 migration follows the same arc. The work starts with a written, fixed scope, moves through a staged upgrade with a tested rollback, and ends with documentation and a support option your team can keep.

How we scope

  • Inventory every v4 content type, custom controller, plugin and front-end consumer that calls the API.
  • Confirm the target Node.js LTS version and a supported database such as PostgreSQL, MySQL, MariaDB or SQLite.
  • Agree in writing which plugins are replaced, removed or rewritten, and which API responses must keep the v4 format.

How we build

  • Run the upgrade tool and codemods on a copy of the project, then review every change they make to custom code.
  • Move Entity Service calls to the Document Service API and test each custom endpoint against its v4 behavior.
  • Rehearse the data migration on a restored production backup, and verify the database backup and rollback path before cutover.

How we hand over

  • Deliver a written record of changed code, removed or replaced plugins, and any temporary Strapi-Response-Format: v4 usage.
  • Provide the cutover runbook, the tested rollback steps and the database backup locations used in rehearsal.
  • Walk your engineers through the Strapi 5 project layout, environment configuration and the checks run after each deployment.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Confirm with DeployOpen what a retainer covers for Strapi minor releases, Node.js LTS changes and plugin updates.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.