lando / wordpress

The Official WordPress Lando Plugin
https://docs.lando.dev/wordpress/
GNU General Public License v3.0
14 stars 7 forks source link

Commands on events/post-rebuild not ran #43

Closed sebastienserre closed 1 year ago

sebastienserre commented 1 year ago

Hello,

A typical WordPress recipe I'm using to debug WordPress customers website:

name: 25136
recipe: wordpress
config:
  webroot: .
  xdebug: true
  database: mariadb
  php: "8.0"
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
  mailhog:
    type: mailhog
    hogfrom:
    - appserver
  redis:
    type: redis
    portforward: true
tooling:
  composer:
    service: appserver
proxy:
    appserver:
      - 25136.lndo.site
      - site1-25136.lndo.site
      - site2-25136.lndo.site
      - site3-25136.lndo.site
      - site4-25136.lndo.site
      - site5-25136.lndo.site
      - site6-25136.lndo.site
      - site7-25136.lndo.site
      - site8-25136.lndo.site
      - site9-25136.lndo.site
      - site10-25136.lndo.site
      - site11-25136.lndo.site
    pma:
      - pma-25136.lndo.site
    mailhog:
      - mailhog-25136.lndo.site
events:
  post-rebuild:
    - appserver: wp core install --url="https://25136.lndo.site" --title="Website 25136" --admin_user="pll-admin" --admin_password="Polylang2020" --admin_email="seb@test.fr"
    - appserver: wp user update pll-admin --locale=us_US
    - appserver: wp plugin activate all-in-one-wp-migration all-in-one-wp-migration-unlimited-extension
    - appserver: wp plugin update --all

All WP CLI commands in the post-rebuildevent hooks are not ran. They were some versions ago.

I do not remember on which version it was running, but it fails on Lando 3.18 and 3.19.5

Regards

pirog commented 1 year ago

@reynoldsalec if you have time it might be worth checking this out. AFAIK this should work, at least post-rebuild works for me.

sebastienserre commented 1 year ago

The error was on my side. The yml syntax is wrong on. Indentation is wrong. I've fixed the alignment and now all is OK.