How to install/configure Sage 10 on Windows?

I just went through this yesterday, Windows dev has some specific caveats and considerations re: Sage 10. I imagine they could be avoided if you opted to use Laravel Mix, or rolled your own Webpack for building assets, but wanted to see if I could get things working “out of the box” so to speak.

Unrelated, you should double check Acorn is active/installed first. Acorn is a requirement of Sage, so if Acorn is not active/detected when you activate Sage, it will result in a Critical Error.

As for the caveats - Bud is used as the new asset build pipeline, which states as a requirement that it must be run under WSL. While you should be able to run yarn to install your dependencies, running yarn build will fail if you’re not in WSL (Windows Subsystem for Linux).

If you are not familiar with WSL, you’ll want to go through Microsoft’s docs on what it is and how to install/configure. You’ll also need to setup PHP, Composer, Node, and yarn in WSL, and you’ll likely need to move the rest of your WordPress dev environment and files into WSL (that is, to the /home folder in WSL). If you want to keep everything accessible in Windows (i.e. keep files on your C drive, but still use WSL tools), you will likely need to fix some file mount permissions too.

Last bit, if you are using VS Code, you should look at their docs developing in WSL.

With everything configured, and within WSL on the command line, you should be able to just run composer install and yarn in your theme directory to install all dependencies, then yarn dev or yarn build for development/building assets.

Hopefully this is helpful, I’d be interested to hear from others how Windows development has been working with Sage 10, as again, I only just set this up yesterday (so maybe have got some things wrong, or am not aware of other edge cases).

4 Likes