Sage 9 Workflow

I’ve been using Sage for a while now, most recently the 8.x version and everything has been great. I usually roll out a Digital Ocean droplet and do my work on there. I’m on a Windows PC and my workflow has been like this:

  1. Go to Digital Ocean, create WordPress droplet, log in with SSH to enable it.
  2. Install software I need (composer, etc) and run commands to download and install Sage.
  3. Then I open up my code editor, I use PHP Storm, and I connect to the remote server. It downloads a copy of all of the files and keeps a copy of them on my computer locally but whenever I make a change to them it automatically uploads them to the remote server.
  4. I run gulp watch on the remote server and the build happens there and I can reload the browser (I’ve never used the Browser Sync since it has never worked for me) and I see my changes.

I tried to do the same thing on Sage 9 but I’ve been told that it doesn’t support working off of a remote server this way. When I run yarn watch it tries to load the Browsersync but fails and then it deletes the CSS file instead of compiling it. It seems every workflow I’ve found adds extra steps to what I’m doing now - for example having to push to a git repo each time I want to see a change.

What is everyone else doing?

Just use your desktop as the server. If you follow the Trellis docs you can use that to get a server set up pretty quickly/locally (pay special attention to the Windows notes and the Local Development Setup sections).

In Windows you could also use something like XAMPP if you’re not interested in a server at all and only want to work in theme development. Then you’ll have a local folder on your hard drive to work off of and you can just place your projects in there.

I also used to just use a VirtualBox VM with Ubuntu on it to get a server set up pretty quickly and develop right inside the VM.