I’ve tweaked the sync-script to use it with Lima and Trellis, and I want to share my approach with you. If you’re interested in syncing between your environments and are using lima for virtualization, keep reading!
Lima WP-CLI aliases
Add the following to your ~/.ssh/config to ensure the wp-cli alias can connect to your lima vm:
# site/wp-cli.yaml
path: web/wp
server:
docroot: web
_:
inherit: wp-cli.trellis-alias.yml
## THE FOLLOWING WORKED FOR staging AND production NOT FOR lima
@development:
ssh: [email protected]/srv/www/example.com/current
@staging:
ssh: [email protected]/srv/www/example.com/current
@production:
ssh: [email protected]/srv/www/example.com/current
If I’m not misunderstanding the wp-cli.yaml file ssh config should only include
# wp-cli.yaml
path: web/wp
server:
docroot: web
_:
inherit: wp-cli.trellis-alias.yml