Can I use shopify cli theme serve to modify a published client store

I want to make some changes to a store that is currently live. I have access to the store as its owner or through a separate partner account that has been granted access.

Is there a way to make and test changes before pushing those changes to the live store?

I understand how to develop and modify my own theme in my partner account using the cli and theme serve, but I can’t figure out how to do this with a client’s store I have access to. This seems to be a different situation than developing a store and than handing it off to the client.

The client store is linked to a github branch. I considered branching off from the ‘live’ branch with git, making a duplicate theme and linking it with the new branch to do the development, and then merging the dev branch with the main branch when changes are complete. Is this a good strategy?

Ideally, I could use the cli and theme serve to make updates to the client store, but I can’t see how to set that up if it is possible. I like the real-time updates while working instead of having to commit-push-refresh every time I make any small change.

You will need either a staff account or collaborator access on the client|merchants store with permissions for themes to use the cli with a merchants store and it’s online sales channel theme.

Always make sure you are in the correct project directory

If already logged in in the cli to your partner dev-store then use the shopify-cli switch command to change to the client stores.

Check the directory you are in as to not overwrite another stores theme or accidently upload the wrong theme to a stores. Then pull down the latest repo, then use the cli theme serve command which creates a hidden development theme for previewing in context of the clients store.

Then either use the cli to sync changes directly into the live theme , or an unpublished theme if there’s a more involved approval process.

Or use git to merge into the repo of the live themes branch or your working branch.

All are valid strategies since depending on your, and the clients, level of sophistication needs.

An alternative is to use themekit instead for sync’ing themes which can be better for dedicated ongoing work to a single store than the overhead of dealing with the shopify-cli . But to know for sure you just have to sit down and go through the motion with both tools.

The cli route worked fine. Exactly what I was trying to figure out.

It is a good warning to be sure to be working in the correct directory. Since I cloned the remote repo, the directory has the same name as the original directory on my computer. This could be confusing if not paying attention.

Thanks!

1 Like