Skip to main content

Migrate to Shopify CLI 4.0

Shopify CLI 4.0 removes deprecated commands and flags, drops support for Node.js 20, and introduces automatic upgrades. Follow this guide to update an existing Shopify CLI 3.x installation and any scripts that use it.


  • Install Node.js 22.12 or higher, including in CI environments.
  • Identify any scripts that run Shopify CLI commands, including package scripts and CI workflows.

Anchor to Step 1: Replace removed commands and flagsStep 1: Replace removed commands and flags

Update your scripts to use the following replacements:

Removed in 4.0Replacement
shopify webhook triggershopify app webhook trigger
shopify theme serveshopify theme dev
shopify app generate schemashopify app function schema
shopify app scaffold extensionshopify app generate extension
shopify app generate extension --type or -tshopify app generate extension --template
SHOPIFY_FLAG_EXTENSION_TYPESHOPIFY_FLAG_EXTENSION_TEMPLATE
shopify app webhook trigger --shared-secretshopify app webhook trigger --client-secret
SHOPIFY_FLAG_SHARED_SECRETSHOPIFY_FLAG_CLIENT_SECRET

Anchor to Step 2: Choose deployment permissionsStep 2: Choose deployment permissions

The app deploy and app release commands no longer accept --force, -f, or SHOPIFY_FLAG_FORCE. Replace them with permissions that match the changes your pipeline needs to make:

Required behaviorFlags
Allow updates without allowing deletions--allow-updates
Allow updates and deletions without a confirmation prompt--allow-updates --allow-deletes

For guidance on avoiding accidental store data deletion, refer to Controlling extension and configuration deployment.

For example, if an unattended deployment uses --force, then replace it with the following command:

terminal

shopify app deploy --allow-updates

Add --allow-deletes only when your pipeline needs permission to delete app configuration or extensions. The app deploy --no-release flag continues to work and implicitly allows updates and deletions for the unreleased version.


Anchor to Step 3: Upgrade Shopify CLIStep 3: Upgrade Shopify CLI

Upgrade Shopify CLI with the package manager that you installed it with:

terminal

npm install -g @shopify/cli@4
yarn global add @shopify/cli@4
pnpm install -g @shopify/cli@4
brew upgrade shopify-cli

The npm, Yarn, and pnpm commands install the latest 4.x release. Homebrew upgrades to the latest available release.

For a project-local installation, update the project's @shopify/cli dependency and commit the lockfile. Update the version in CI workflows that install Shopify CLI directly.

Starting with 4.0, Shopify CLI upgrades itself automatically within the current major version. It doesn't upgrade automatically in CI environments or project-local installations, or when the next release changes the major version.

To turn off automatic upgrades, run:

terminal

shopify config autoupgrade off

To turn them on again, run shopify config autoupgrade on.


Anchor to Step 4: Verify your migrationStep 4: Verify your migration

Check the version from the directory where you run Shopify CLI:

terminal

shopify version

Confirm that it reports 4.x. Check your package scripts and CI workflows for removed commands, flags, and environment variables. Run your usual development workflow with the updated installation.



Was this page helpful?