Installing Roots Trellis / Bedrock / Sage

Not sure how I feel about Roots.io –> The tutorials seem super easy, but I noticed you can quickly run into issues. What doesn’t help is that I can’t really find any reviews / user tutorials past 2016, the Roots discourse forum appears to be a bubble (not accepting new or differing ideas), and I heard the founder is difficult; but some big websites still use it.

Apparently, Laravel Valet is where its at!

Still, I spent the morning learning how to use it, and wanted to share what worked for me (Mac Pro 4,1 – High Sierra).

Getting started, first you need to install these dependencies (or, make sure they are up-to-date):

Setting up a Project

In terminal, Make a new directory:
mkdir ~/Sites

Add a web folder:
mkdir example.com && cd example.com

Clone Trellis:
git clone --depth=1 https://github.com/roots/trellis.git && rm -rf trellis/.git

Clone Bedrock:
git clone --depth=1 https://github.com/roots/bedrock.git site && rm -rf site/.git

Install Sage:
composer create-project roots/sage site/web/app/themes/sage

Local Setup

Go to the root directory (up one folder):
cd ..

Add Roots Example Project:
git clone https://github.com/roots/roots-example-project.com.git

Install the components:

cd roots-example-project.com/site/web/app/themes/sage
composer install
yarn && yarn build
cd ../../../../..
cd trellis
vagrant up

Test the WP install roots-example-project.test

To shut down the server: vagrant halt

Setting up Staging / Production servers will have to be in another post.

Isaac Adams-Hands

Full Stack Developer, Digital Marketer, and InfoSec enthusiast. He received his Bachelor’s Degree from the University of Western Sydney and his Business Diploma from Georgian College before joining various marketing positions in search portals, e-commerce, higher education, and addiction recovery services.

Follow @ twitter

Related posts

Defining what content shows up based on page type

Quick code to define what content shows up based on page type. I had to have different containers show up depending on page. The Code

Adding the_excerpt in WP

How to add auto excerpts to a WP Theme: For this example, I’m using the WP Bootstrap Starter theme (remember to create a Child theme, or you will lose any edits after you update). You need to locate content.php file, it should be under the template-parts folder: Find the code: Approx. line 33. Replace with:… Read More