Development Setup
Lando is the official Conifer development environment, and comes highly recommended. It's the best local dev tool in the galaxy!
First, install Lando if you haven't already. Your future self will thank you.
Clone
git clone git@github.com:sitecrafting/conifer.gitNote: Lando setups are self-contained, so it doesn't matter where you clone it to (as it would if using Vagrant, MAMP, or similar).
Start
cd conifer
lando startThe first time you start the app, it will install WordPress, Timber, and the Groot starter theme for you. Then it will expose your local Conifer dev site at https://conifer.lndo.site (or similiar).
WP Admin username: conifer
Password: conifer
That's it
Yup, that's pretty much all there is to it.
Recommended next steps:
- If you're new to Lando, we suggest reading the Overview, and then the WordPress recipe tutorial. Conifer uses the WordPress recipe under the hood, so it's useful to know what's going on.
- Run
landowith no arguments to see/verify custom tooling commands (also see Custom Lando Tooling, below) - Log in to /wp-admin to verify the credentials you set up
- Explore the testing setup
- Start hacking on Conifer! 🌲 🚀 🎉
Custom Lando Tooling
Conifer's Lando environment comes with several goodies for making local development a breeze.
CLI commands
Along with the universal Lando commands, we get these commands for free from Lando's built-in WordPress recipe:
lando wp: run WP-CLI commandslando composer: run composer commandslando db-import <file>: Import a WordPress database from a .sql or .sql.gz file. The file must be inside your Conifer directory tree!lando php: run arbitrary PHP commandslando mysql [wordpress]: drop into a MySQL shell (wordpressis the name of the database Lando installs for us)
Conifer's Lando setup also provides these commands:
lando unit: run Conifer's PHPUnit test suitelando sniff: run PHPCS on the Conifer codebaselando analyze: run PHPStan static analysis on the Conifer codebaselando debug:tailthe WP debug.log in real timelando yarn: run arbitrary yarn commandslando docs: build the Conifer doc site being served from thedocsservice (https://docs.conifer.lndo.site or similar)
Serving a local documentation site
If you're working on docs, it's helpful to see the doc site as compiled from your exact copy of the Markdown files.
To that end, you can run lando docs to build the docs site once.
Mailhog
Conifer's Lando environment also includes a Mailhog instance for catching and managing outgoing mail at https://mailhog.conifer.lndo.site or similar
The URL may be different depending on which ports are already take on your computer. Run lando info to see the actual URLs.