Skip to content

"core install" defines an incorrect home and siteurl if wpcli is executed from the root of the filesystem #297

@jb-boin

Description

@jb-boin

Bug Report

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

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.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions