-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
"core install" defines an incorrect home and siteurl if wpcli is executed from the root of the filesystem.
Describe how other contributors can replicate this bug
- Copy the wpcli phar package on / (for example: /wp)
- Call "/wp core install" with valid --path and --url (for exemple: --path="/home/customer/website" and --url= "https://website.domain.tld")
- The siteurl and home options are incorrect in the database (for example: https://website.domain.tldhome/customer/website instead of https://website.domain.tld)
Describe what you would expect as the correct outcome
Those values should be identical to the --url passed to the "core install" command and not depending on the path where the wpcli executable is located.
Let us know what environment you are running this on
wp-cli 2.12.0 on Debian 11 and PHP 8.4.
OS: Linux 5.10.0-34-amd64 #1 SMP Debian 5.10.234-1 (2025-02-24) x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php8.4
PHP version: 8.4.14
php.ini used: /etc/php/8.4/cli/php.ini
MySQL binary: /usr/bin/mariadb
MySQL version: mariadb Ver 15.1 Distrib 10.5.29-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: phar:///wp
WP-CLI packages dir: /home/www/.wp-cli/packages/
WP-CLI cache dir: /home/www/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.12.0
Provide additional context
I stumbled into this issue because i'm executing wpcli on a bubblewrap microcontainer where i was bind mounting the wpcli phar on the root of the virtual filesystem for convenience but the issue is not related to bubblewrap as it's happening even on the host OS.