.lando.yml la file cau hinh chinh cua Lando, dinh nghia toan bo stack: PHP version, database, web server, Node.js, Xdebug, tooling. Bai nay di chi tiet tung cau hinh cho WordPress.
1. Cau hinh co ban
name: my-project
recipe: wordpress
config:
webroot: .
php: "8.3"
database: mariadb:10.11
via: nginx
2. The Node.js service
services:
node:
type: node:20
build_as_root:
- npm install -g gulp-cli
3. Tooling
tooling:
npm:
service: node
gulp:
service: node
wp:
service: appserver
cmd: wp --path=/app
composer:
service: appserver
4. Xdebug
config:
xdebug: true
5. Environment variables
env:
WP_ENVIRONMENT_TYPE: local
WP_HOME: "http://my-project.lndo.site"
WP_SITEURL: "http://my-project.lndo.site/wp"
6. Proxy config
proxy:
appserver:
- my-project.lndo.site
- admin.my-project.lndo.site
7. Events
events:
post-start:
- appserver: cd /app && wp cache flush
- appserver: echo "Ready!"
Xem them: docs.lando.dev | Bai gioi thieu Lando