Skip to content
Example Roots stack project (Trellis, Bedrock, Sage)
PHP Python JavaScript Ruby HTML CSS Shell
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
site Latest Bedrock (WP 5.2) and Trellis May 7, 2019
trellis Latest Bedrock (WP 5.2) and Trellis May 7, 2019 chore(readme): Use brand color for Twitter follow badge Jul 15, 2019

Roots Example Project

WordPress Version Follow Roots

This repository is an example of how to integrate and use the following projects together:

For more background, see this blog post.

This project is a complete working example that's deployed on a Digital Ocean $5 droplet.

You can view it at


Make sure you have installed all of the dependencies for Trellis, Bedrock and Sage before moving on.

At a minimum you need to have:

See our Getting Started docs:


Here's how this example project was created:

  1. Create a new project directory: $ mkdir && cd
  2. Clone Trellis: $ git clone --depth=1 && rm -rf trellis/.git
  3. Clone Bedrock: $ composer create-project roots/bedrock site
  4. Install Sage: $ composer create-project roots/sage site/web/app/themes/sage      # → Root folder for the project
├── trellis/      # → System management & deployment
└── site/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)

Local development setup

  1. Clone this repository into a working directory (e.g., ~/Sites)
$ git clone
  1. Install theme components
# @
$ composer install
$ yarn && yarn build
  1. Fire up the server (be patient, but watch the console––it may prompt for your system password)
# @
$ vagrant up

Note: to shut down the server: vagrant halt

  1. Test the install at roots-example-project.test

Remote server setup (staging/production)

Provision server:

# @
$ ansible-playbook server.yml -e env=<environment>


# @
./ <environment>

# OR
ansible-playbook deploy.yml -e " env=<environment>"

To rollback a deploy:

ansible-playbook rollback.yml -e " env=<environment>"

Theme development

In development, run yarn start for live updates at localhost:3000. Important: always use the roots-example-project.test URL to access the WordPress admin.

# @
$ yarn start

Production assets (minified CSS, JavaScript, images, fonts, etc.) need to be compiled. Run yarn build:production. The resulting files will be saved in themes/sage/dist/. Never edit files in the dist directory.

# @
$ yarn build:production


Contributions are welcome from everyone. We have contributing guidelines to help you get started.


Keep track of development and community news.

You can’t perform that action at this time.