I have a knack for hitting every possible obstacle. It stems from the early days of my education and is something I’ve had to hobble through life trying to mitigate. Since the internet though, I’ve found that there are many others like me.
So when I try a new technology I am in the habit of documenting my steps both so I can get the best possible support and so I can help others avoid the pitfalls I encounter.
This time, I was trying to develop a new website with Trellis (WordPress optimized server) + Bedrock (a fork of WordPress Core) + Sage (a WordPress Theme designed for use with Bedrock).
This guide is designed to walk you through literally every step of the process. There are some preferential things I do, and you’re welcome to skip those, but I’m not going to provide alternative instructions because… well I just don’t want to spend the time doing that right now, haha.
Setup Your Environment (Trellis)
- Download and Install Google Chrome
- Download and Install Sublime Text 3
- Download and Install iTerm
- Install Brew – This is a package installer, required to install ZSH.
- Note: Check to see if you have Brew installed first.
- Install ZSH – This is a prerequisite for Oh My ZSH.
- Note: Check to see if you have ZSH installed first:
- Install Oh My ZSH – This adds code coloring and other improvements to your Shell (Terminal / iTerm).
- Install Ansible
- To avoid the module six error that occurs for some sites, running an older version of Trellis execute:
sudo pip install --ignore-installed six
- If that solution doesn’t work, try downgrading Ansible. My version is 2.4.x which gives this error. Downgrading to 184.108.40.206
sudo pip install ansible==220.127.116.11 and you can check your version with
ansible --version or with Homebrew
brew search to see available versions and then
brew install email@example.com and
brew link --force firstname.lastname@example.org) as you switch between projects.
- Also checkout this post on StackOverflow that is really detailed.
- Install VirtualBox
- Install Vagrant – Think of Ansible like WordPress’ system to install Plugins. Other developers can write scripts to setup a whole server and give that script to Ansible which executes it.
- Install Vagrant-BindFS
- Install Vagrant-HostManager
- Install ClipMenu for Mac
- Create a local SSH key and copy it to Github.
Setup the WordPress Install (Bedrock)
- In Terminal, navigate to your site’s root directory /site and execute: “composer require roots/wp-h5bp-htaccess 2.0.1“
Then follow the rest of the instructions here, see my notes below for nuances.
- When I created my Digital Ocean Droplet I chose “Monitoring” and “IPV 6”.
- I want to contribute a comment in the code for each wordpress_sites.yml that states it must be the same parent level domain across each.
- There is a typo in the instructions on `https://roots.io/trellis/docs/remote-server-setup/` when you run that command it requires you to install
pastille but the second line is missing
sudo at the beginning.
- Possibly add to docs a note about consequences when you re-run scripts/playbooks. For Ex. The SSL issue.
- If you only allow access to the server via SSH Key Pairs and you happen to lose the Private Key then you can regain access if by uploading a new Public Key via the Digital Ocean console found here: https://discourse.roots.io/t/help-with-users-on-secured-droplet/4713/6
- What if you’re not with Digital Ocean? Then – worst case – you would plug a monitor, keyboard and mouse into the physical computer and manage it as if it were an ordinary computer.
This post is related to: