There is a similar issue for the install
sub-command (not is-installed
),
where wp
CLI exits silently with exit code 255
:
opened 05:09PM - 03 May 19 UTC
bug
command:core-install
## Bug Report
- [x] Yes, I reviewed the [contribution guidelines](https://mak… e.wordpress.org/cli/handbook/contributing/).
- [x] Yes, more specifically, I reviewed the guidelines on [how to write clear bug reports](https://make.wordpress.org/cli/handbook/bug-reports/).
**Describe the current, buggy behavior**
`wp core install` fails silently; `echo $?` shows error code 255
**Describe how other contributors can replicate this bug**
- clone my repo and run it on CircleCI: https://github.com/simpixelated/wordpress-ci
- view my current failing build: https://circleci.com/gh/simpixelated/wordpress-ci/13#tests/containers/0
Here are the commands I'm running after installing wp-cli:
```
wp core download
wp config create --dbhost=127.0.0.1 --dbname=$WORDPRESS_DB_NAME --dbuser=$WORDPRESS_DB_USER --dbpass=$WORDPRESS_DB_PASSWORD
wp core install --url=localhost --title=test --admin_user=test --admin_password=test --admin_email=test@example.com
```
**Describe what you would expect as the correct outcome**
install succeeds or at least provides more debug info about why it fails
**Let us know what environment you are running this on**
CircleCI using their PHP and MySQL docker images
Here is the output from running `core install` again on the CircleCI box directly (via ssh) with all `--skip` options and `--debug` added. I tried specifying a path for download, config, and install, but it still fails at the same spot. I can see that the wp-config.php file exists at that path and it looks correct.
```
Debug (bootstrap): argv: /usr/local/bin/wp core install --url=localhost --title=test --admin_user=test --admin_password=test --admin_email=test@example.com --path=wordpress --debug --skip-themes --skip-plugins --allow-root --skip-email --skip-packages (0.079s)
Debug (bootstrap): ABSPATH defined: /home/circleci/project/wordpress/ (0.079s)
Debug (bootstrap): Set URL: localhost (0.079s)
Debug (bootstrap): Begin WordPress load (0.08s)
Debug (bootstrap): wp-config.php path: /home/circleci/project/wordpress/wp-config.php (0.08s)
```
The approach is the same for your issue:
If necessary, you need to manually create the current
symlink to the failed release (where wp
CLI exits with code 255
) and then request the site over HTTP(S). Then check the PHP-FPM global and site-wide logs (again).
Also note that Sage can indeed catch and log some PHP errors in its own log file, so those may not end up in the default PHP-FPM log files:
https://discourse.roots.io/t/tip-http-500-but-no-php-nginx-error-logs/22349