Liquid Tutorial

theme push & pull

Source: ShopifyDevs

Deploying Theme Files to Shopify

shopify theme push uploads local files to a remote theme. shopify theme pull downloads remote files to local. Use pull when a merchant edited the theme in Admin and you need to reconcile, or when taking over an existing store.

BASH
# List all themes on the store
shopify theme list --store your-store.myshopify.com

# Push to a NEW unpublished theme (safest for staging)
shopify theme push \
  --store your-store.myshopify.com \
  --unpublished \
  --theme "Staging v2"

# Push to an existing theme by ID
shopify theme push \
  --store your-store.myshopify.com \
  --theme 123456789012

# Push and publish live (DANGEROUS — prompts for confirmation)
shopify theme push --store your-store.myshopify.com --publish

# Pull remote theme to local
shopify theme pull \
  --store your-store.myshopify.com \
  --theme 123456789012

Deployment Safety

  1. Always test on a development or unpublished theme first
  2. Run shopify theme check locally before every push
  3. Use --only and --ignore to push specific files during hotfixes
  4. Never push directly to live during business hours without a rollback plan
  5. Keep Git tags matching each production push for quick revert
BASH
# Push only changed sections (hotfix)
shopify theme push \
  --only sections/header.liquid \
  --theme LIVE_THEME_ID
Note: theme push overwrites remote files. It does not delete remote files that you deleted locally unless you use --nodelete false. Understand the flags before scripting deploys.