The public Trellis contains Ansible playbooks for setting up a LEMP stack for local WordPress development environments with Vagrant.
Trellis will configure a server with the following and more:
- Ubuntu 14.04 Trusty LTS
- Nginx (with optional FastCGI micro-caching)
- PHP 7.0
- MariaDB (a drop-in MySQL replacement)
- SSL support (scores an A+ on the Qualys SSL Labs Test)
- Let's Encrypt integration for free SSL certificates
- HTTP/2 support (requires SSL)
- Composer
- WP-CLI
- sSMTP (mail delivery)
- MailHog
- Memcached
- Fail2ban
- ferm
Make sure all dependencies have been installed before moving on:
- Ansible 2.0.2
- Virtualbox >= 4.3.10
- Vagrant 1.8.1
- vagrant-bindfs >= 0.3.1 (Windows users may skip this)
- vagrant-hostmanager
Clone this repository along with the site itself into the following directory structure:
blog.codecorps.org/ # → Root folder for this project
├── trellis-public/ # → Your clone of this repository
├── trellis/ # → Your clone of the private Trellis repository (acccess limited; private for security)
└── site/ # → Your clone of the site repository, a Bedrock-based WordPress site
└── web/
├── wp/ # → WordPress core (don't touch!)
└── app/ # → WordPress content directory (themes, plugins, etc.)
└── web/themes/codecorps # → Code Corps theme directory (where most blog dev work will happen)
- Create the main project directory (if not already created):
$ mkdir blog.codecorps.org && cd blog.codecorps.org
- Clone Trellis:
$ git clone git@github.com:code-corps/blog.codecorps.org-trellis-public.git trellis-public
- Clone the site:
$ git clone git@github.com:code-corps/blog.codecorps.org-site.git site
- Install the Ansible Galaxy roles:
$ cd trellis && ansible-galaxy install -r requirements.yml
Windows user? Read the Trellis Windows docs for slightly different installation instructions. Please modify them to match these docs. VirtualBox is known to have poor performance in Windows — use VMware or see some possible solutions.
Trellis documentation is available at https://roots.io/trellis/docs/.
- Configure your WordPress sites in
group_vars/development/wordpress_sites.yml
and ingroup_vars/development/vault.yml
- Run
vagrant up
Read the local development docs for more information.
Contributions are welcome from everyone. We have contributing guidelines to help you get started.
Join the Code Corps community at https://codecorps.org/code-corps/code-corps