Skip to content

Instantly share code, notes, and snippets.

@nicomollet
Last active March 3, 2021 16:11
Show Gist options
  • Save nicomollet/c900c9ee75e464fa581ec54d8459ec11 to your computer and use it in GitHub Desktop.
Save nicomollet/c900c9ee75e464fa581ec54d8459ec11 to your computer and use it in GitHub Desktop.
Lando Recipe for WordPress
name: SITENAME
recipe: wordpress
config:
webroot: .
env: dev
via: apache #nginx doesn't work, don't know why
php: 7.3
#xdebug: true
database: mysql
services:
pma:
type: phpmyadmin
hosts:
- database
mailhog:
type: mailhog
hogfrom:
- appserver
appserver:
run:
tooling:
composer:
service: appserver
install:wordpress:
service: appserver
cmd:
- wp core download && wp config create --dbname=wordpress --dbuser=wordpress --dbpass=wordpress --dbhost=database
proxy:
pma:
- pma.SITENAME.lndo.site
mailhog:
- mail.SITENAME.lndo.site
events:
post-db-import:
- appserver: wp search-replace "wordpress.l" "SITENAME.lndo.site" --all-tables --verbose --skip-columns=guid
- appserver: wp plugin deactivate wp-rocket
#- appserver: wp plugin update --all && wp language plugin update --all && wp theme update --all && wp language theme update --all && wp core update --force && wp language core update
excludes:
- wp-content/uploads
- wp-content/cache
- wp-content/upgrade
- wp-content/languages
- sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment