Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core install fails silently (error code 255) #123

Open
2 tasks done
simpixelated opened this issue May 3, 2019 · 3 comments
Open
2 tasks done

core install fails silently (error code 255) #123

simpixelated opened this issue May 3, 2019 · 3 comments

Comments

@simpixelated
Copy link

Bug Report

Describe the current, buggy behavior

wp core install fails silently; echo $? shows error code 255

Describe how other contributors can replicate this bug

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 [email protected]

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 [email protected] --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)
@leonstafford
Copy link

@simpixelated - I had the same issue. Steps to debug/resolve in my case:

  • ssh in to circleci at failure point
  • curl the WP URL
  • had apache config issues, fixed
  • curl the WP URL
  • PHP error showing missing PHP extension (mysqli), installed
  • re-run wp core install. Success.

@leonstafford
Copy link

This is a WIP, but a green build for reference: https://circleci.com/gh/WP2Static/wp2static/755

@schlessera
Copy link
Member

I assume in the reporter's case, the issue is something similar to an extension missing. I agree that WP-CLI should do a better job here of letting the user know what is happening. Silently failing is never a good option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants