Lando is the official Conifer development environment, and comes highly recommended. It's the best local dev tool in the galaxy!
We also support Varying Vagrant Vagrants, although much of the tooling around testing etc. may require some tweaking depending on your setup.
First, install Lando if you haven't already. Your future self will thank you.
git clone firstname.lastname@example.org:sitecrafting/conifer.git
Note: Lando setups are self-contained, so it doesn't matter where you clone it to (as it would if using Vagrant, MAMP, or similar).
cd conifer lando start
WP Admin username: conifer
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.
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! 🌲 🚀 🎉
Conifer's Lando environment comes with several goodies for making local development a breeze.
lando wp: run WP-CLI commands
lando composer: run composer commands
lando 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 commands
lando 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 suite
lando e2e: run Conifer's end-to-end Cypress test suite
lando cypress: run arbitrary
lando sniff: run PHPCS on the Conifer codebase
tailthe WP debug.log in real time
lando yarn: run arbitrary yarn commands
lando docs: build the Conifer doc site being served from the
docsservice (https://docs.conifer.lndo.site or similar)
lando gitbook: Run arbitrary gitbook commands.
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.
It's annoying to do that over and over, though. To rebuild the docs automatically whenever a Markdown file changes, run
lando gitbook serve. This will start a process and block your current shell session; press
Ctrl-C to exit the process.
Warning: The localhost URL in the output is misleading
gitbook serve command starts a web server at
localhost:4000, but this is actually the
localhost inside the
docs service container, meaning you can't actually view the doc site at that address. Go to the proxy URL output by
lando start or
lando info instead. This will be something like https://docs.conifer.lndo.site.
The URL may be different depending on which ports are already take on your computer. Run
lando info to see the actual URLs.