From 55e037fa3a897a09891f9e47531d898dcc4e95ab Mon Sep 17 00:00:00 2001 From: George Dumitrescu Date: Wed, 11 Nov 2026 10:45:22 +0200 Subject: [PATCH] feat: let WordPress and Bedrock run lerd's wp-cli without composer WordPress 5, 6 and 7 and Bedrock 1 name lerd's wp-cli tool under vendor_bin_tools, so lerd wp works on a site that never installed wp-cli through composer. Binaries that predate the key ignore it. The CLI ini also sends PHP's notices to stderr and leaves out its own deprecations. The wp-cli 2.12.0 phar bundles code PHP 8.5 deprecates, and without this every lerd wp on 8.5 printed a notice into stdout, which broke piped output such as a database export. Refs geodro/lerd#1744 --- frameworks/bedrock/1.yaml | 9 +++++++++ frameworks/wordpress/5.yaml | 9 +++++++++ frameworks/wordpress/6.yaml | 9 +++++++++ frameworks/wordpress/7.yaml | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/frameworks/bedrock/1.yaml b/frameworks/bedrock/1.yaml index a7f67d6..ff442ad 100644 --- a/frameworks/bedrock/1.yaml +++ b/frameworks/bedrock/1.yaml @@ -12,6 +12,10 @@ php: # wp-cli unzips core and dumps databases in one process; 128M is not enough. cli_ini: memory_limit: 512M + # lerd's wp-cli phar bundles code PHP 8.5 deprecates; keep notices off stdout + # so piped wp output stays clean, and off the terminal for PHP's own ones. + display_errors: stderr + error_reporting: "24575" detect: - file: web/wp-config.php @@ -51,6 +55,11 @@ vendor_bin_args: wp: - --allow-root +# Without composer's wp-cli, lerd wp runs the wp-cli lerd pins in its tools +# manifest, fetched on first use. +vendor_bin_tools: + wp: wp-cli + tinker: command: ["vendor/wp-cli/wp-cli/php/boot-fs.php", "eval", "--allow-root"] execute_positional: true diff --git a/frameworks/wordpress/5.yaml b/frameworks/wordpress/5.yaml index 39d8345..78c435f 100644 --- a/frameworks/wordpress/5.yaml +++ b/frameworks/wordpress/5.yaml @@ -10,6 +10,10 @@ php: # wp-cli unzips core and dumps databases in one process; 128M is not enough. cli_ini: memory_limit: 512M + # lerd's wp-cli phar bundles code PHP 8.5 deprecates; keep notices off stdout + # so piped wp output stays clean, and off the terminal for PHP's own ones. + display_errors: stderr + error_reporting: "24575" detect: - file: wp-login.php @@ -47,6 +51,11 @@ vendor_bin_args: wp: - --allow-root +# Without composer's wp-cli, lerd wp runs the wp-cli lerd pins in its tools +# manifest, fetched on first use. +vendor_bin_tools: + wp: wp-cli + tinker: command: ["vendor/wp-cli/wp-cli/php/boot-fs.php", "eval", "--allow-root"] execute_positional: true diff --git a/frameworks/wordpress/6.yaml b/frameworks/wordpress/6.yaml index efa146d..d8f1699 100644 --- a/frameworks/wordpress/6.yaml +++ b/frameworks/wordpress/6.yaml @@ -10,6 +10,10 @@ php: # wp-cli unzips core and dumps databases in one process; 128M is not enough. cli_ini: memory_limit: 512M + # lerd's wp-cli phar bundles code PHP 8.5 deprecates; keep notices off stdout + # so piped wp output stays clean, and off the terminal for PHP's own ones. + display_errors: stderr + error_reporting: "24575" detect: - file: wp-login.php @@ -47,6 +51,11 @@ vendor_bin_args: wp: - --allow-root +# Without composer's wp-cli, lerd wp runs the wp-cli lerd pins in its tools +# manifest, fetched on first use. +vendor_bin_tools: + wp: wp-cli + tinker: command: ["vendor/wp-cli/wp-cli/php/boot-fs.php", "eval", "--allow-root"] execute_positional: true diff --git a/frameworks/wordpress/7.yaml b/frameworks/wordpress/7.yaml index 0187332..d841c74 100644 --- a/frameworks/wordpress/7.yaml +++ b/frameworks/wordpress/7.yaml @@ -10,6 +10,10 @@ php: # wp-cli unzips core and dumps databases in one process; 128M is not enough. cli_ini: memory_limit: 512M + # lerd's wp-cli phar bundles code PHP 8.5 deprecates; keep notices off stdout + # so piped wp output stays clean, and off the terminal for PHP's own ones. + display_errors: stderr + error_reporting: "24575" detect: - file: wp-login.php @@ -47,6 +51,11 @@ vendor_bin_args: wp: - --allow-root +# Without composer's wp-cli, lerd wp runs the wp-cli lerd pins in its tools +# manifest, fetched on first use. +vendor_bin_tools: + wp: wp-cli + tinker: command: ["vendor/wp-cli/wp-cli/php/boot-fs.php", "eval", "--allow-root"] execute_positional: true