Deploy - how?

This is my first Sage theme so I don’t have clear workflow yet.

I have build my Sage theme locally on Vagrant (using Trellis, Gulp, Bower). Now I need to copy theme to online server so other users can start adding content (text, images etc) to WordPress.

What is the way to deploy current state of theme to online server? After deployment I still need to make some modifications and addons to theme. But right now I need theme to be available at the server.

I did do: gulp --production
Should I now just copy whole folder from: sites/ to server?
Or what is correct way?

I have bought Theme Development with Sage but Theme deployment documentation is very limited on it.


I have now pushed my theme to GitHub. I’m using shared hosting, so how I should set production server? How to define folder etc?

Yup! You can exclude the bower_components and node_modules folders as they aren’t needed on production.

If you’re using shared hosting then you won’t be able to use Trellis to do deployments

I don’t use Trellis for deployments. What I did is configure a new task called “zip” (which is run as “gulp zip” from the command line) that puts only the deploy-relevant files into a zip file, which can be extracted where I wish.

You can see an example here:


Take a look at WP Migrate DB Pro by delicious brains. You can sync your local/test/prod environment through the admin area of WP. Syncing the database and the uploads will make your life much easier. Moving code will still have to be done however you have it setup (sftp/script).