shopify theme push
Uploads your local theme files to the connected store, overwriting the remote version if specified.
Uploads your local theme files to Shopify, overwriting the remote version if specified.
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
You can run this command only in a directory that matches the default Shopify theme folder structure.
This command returns the following information:
- A link to the editor for the theme in the Shopify admin.
- A preview link that you can share with others.
If you use the --json flag, then theme information is returned in JSON format, which can be used as a machine-readable input for scripts or continuous integration.
Sample output:
{
"theme": {
"id": 108267175958,
"name": "MyTheme",
"role": "unpublished",
"shop": "mystore.myshopify.com",
"editor_url": "https://mystore.myshopify.com/admin/themes/108267175958/editor",
"preview_url": "https://mystore.myshopify.com/?preview_theme_id=108267175958"
}
}Usage
shopify theme push
shopify theme push --unpublished --jsonSummary
Uploads your local theme files to the connected store, overwriting the remote version if specified.
Flags
--listing <value>string— The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory. optional Environment:SHOPIFY_FLAG_LISTING.--no-color— Disable color output. optional Environment:SHOPIFY_FLAG_NO_COLOR.--password <value>string— Password generated from the Theme Access app or an Admin API token. optional Environment:SHOPIFY_CLI_THEME_TOKEN.--path <value>string— The path where you want to run the command. Defaults to the current working directory. optional Environment:SHOPIFY_FLAG_PATH.--strict— Require theme check to pass without errors before pushing. Warnings are allowed. optional Environment:SHOPIFY_FLAG_STRICT_PUSH.--verbose— Increase the verbosity of the output. optional Environment:SHOPIFY_FLAG_VERBOSE.-a, --allow-live— Allow push to a live theme. optional Environment:SHOPIFY_FLAG_ALLOW_LIVE.-c, --development-context <value>string— Unique identifier for a development theme context (e.g., PR number, branch name). Reuses an existing development theme with this context name, or creates one if none exists. optional Environment:SHOPIFY_FLAG_DEVELOPMENT_CONTEXT.-d, --development— Push theme files from your remote development theme. optional Environment:SHOPIFY_FLAG_DEVELOPMENT.-e, --environment <value>string— The environment to apply to the current command. optional Environment:SHOPIFY_FLAG_ENVIRONMENT.-j, --json— Output the result as JSON. Automatically disables color output. optional Environment:SHOPIFY_FLAG_JSON.-l, --live— Push theme files from your remote live theme. optional Environment:SHOPIFY_FLAG_LIVE.-n, --nodelete— Prevent deleting remote files that don't exist locally. optional Environment:SHOPIFY_FLAG_NODELETE.-o, --only <value>string— Upload only the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards. optional Environment:SHOPIFY_FLAG_ONLY.-p, --publish— Publish as the live theme after uploading. optional Environment:SHOPIFY_FLAG_PUBLISH.-s, --store <value>string— Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com). optional Environment:SHOPIFY_FLAG_STORE.-t, --theme <value>string— Theme ID or name of the remote theme. optional Environment:SHOPIFY_FLAG_THEME_ID.-u, --unpublished— Create a new unpublished theme and push to it. optional Environment:SHOPIFY_FLAG_UNPUBLISHED.-x, --ignore <value>string— Skip uploading the specified files (Multiple flags allowed). Wrap the value in double quotes if you're using wildcards. optional Environment:SHOPIFY_FLAG_IGNORE.