New to Roots / Sage and taking over an existing project

Hi. I’ve recently been asked to take-over website maintenance on a site where the previous developer has gone AWOL. The site’s based on a Sage theme and I have what’s in the themes directory on the live webserver and basically nothing else (no handover, git repos, etc.). I have no idea what the previous dev’s workflow was or how they deployed theme changes.

I’ve been asked to make some urgent but minor changes which I’ve done by directly editing the files in the resources directory, but moving forward I’d like to get myself set-up with Sage properly. I’ve been reading/watching tutorials online but they all seems to be based around starting a brand new Sage project.

What would be the best way to get started updating an existing one? I have previous experience with PHP and Wordpress theming but I’ve never used a starter theme like Sage before or needed to use build commands or anything.

Thanks in advance

If the entire theme was uploaded, then you could just downloaded it and just skip any of the guide instructions that talk about getting the repo or doing initial setup. So long as you have a package.json and composer.json in the them, running npm install and composer install should set you up with what the theme needs for local development, at which point all the stuff in the guides around build process, etc, should be follow-able.

Beyond that, though, it’s hard to provide very specific guidance: Since Sage is a starter theme, there’s no way for us to know how this other dev might have customized it, tweaked things, etc.

I don’t know which version of Sage you’re on, but if you editing the source files then it would have any effect on the site “live” unless you ran the build process. If you edited built assets, then keep in mind that as soon as you run the build process those will be overwritten and your changes will disappear.

If you find you’re really stuck and need some serious help, I’d recommend posting in our Jobs forum to find someone you can pay to give you project-specific in-depth help.

Thanks for the advice - that’s really helpful. I’m thinking I might like to use Sage for other projects moving forward, so I’m definitely keen to try and learn it myself as opposed to hiring another dev.

I’ve double-checked and changes to the files in the resources directory definitely do affect the live site. If that’s not how it should work, would this suggest to you that there might be a non-standard set-up? Here’s what the structure of the theme directory looks like.

Screenshot 2022-04-11 172503

Which resources, specifically?

If the resources in question are CSS, then yes, this is likely a nonstandard setup. The folder in your screenshot called “dist” is the folder that built assets should be in–that’s the folder that the theme should be using for the frontend. When the build process runs, it takes the files in resources, compiles and builds them, and places the results in dist. Sage’s helper functions (i.e. asset() or things like that) look for files in dist. You can look at asset URLs on the frontend to see if they contain dist or resources.