Working within a Docker container (circleci/php:latest) and I'm struggling with wp-cli a bit. When I attempt to run wp core install
I get a silent failure with 255 exit code. I enabled --debug hoping to get some more information but unfortunately all I can see is that it stops after reading wp-config.php.
circleci@142b5627c098:~/wordpress$ wp core install --url=example.com --title="Example" --admin_user=admin [email protected] --skip-email --debug
Debug (bootstrap): Fallback autoloader paths: phar://wp-cli.phar/vendor/autoload.php (0.01s)
Debug (bootstrap): Loading detected autoloader: phar://wp-cli.phar/vendor/autoload.php (0.011s)
Debug (commands): Adding command: cache (0.015s)
Debug (commands): Adding command: transient (0.017s)
Debug (commands): Adding command: comment (0.019s)
Debug (commands): Adding command: meta in comment Namespace (0.02s)
Debug (commands): Adding command: menu (0.021s)
Debug (commands): Adding command: item in menu Namespace (0.022s)
Debug (commands): Adding command: location in menu Namespace (0.022s)
Debug (commands): Deferring command: network meta (0.023s)
Debug (commands): Adding command: option (0.024s)
Debug (commands): Adding command: post (0.026s)
Debug (commands): Adding command: meta in post Namespace (0.026s)
Debug (commands): Adding command: term in post Namespace (0.027s)
Debug (commands): Adding command: post-type (0.028s)
Debug (commands): Adding command: site (0.03s)
Debug (commands): Adding command: meta in site Namespace (0.031s)
Debug (commands): Adding command: option in site Namespace (0.032s)
Debug (commands): Adding command: taxonomy (0.033s)
Debug (commands): Adding command: term (0.034s)
Debug (commands): Adding command: meta in term Namespace (0.035s)
Debug (commands): Adding command: user (0.037s)
Debug (commands): Adding command: meta in user Namespace (0.038s)
Debug (commands): Adding command: session in user Namespace (0.039s)
Debug (commands): Adding command: term in user Namespace (0.04s)
Debug (commands): Adding command: network (0.04s)
Debug (hooks): Processing hook "after_add_command:network" with 1 callbacks (0.04s)
Debug (hooks): On hook "after_add_command:network": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.04s)
Debug (commands): Adding command: meta in network Namespace (0.041s)
Debug (commands): Adding command: db (0.044s)
Debug (commands): Adding command: plugin (0.048s)
Debug (commands): Adding command: theme (0.05s)
Debug (commands): Adding command: mod in theme Namespace (0.051s)
Debug (commands): Adding command: scaffold (0.053s)
Debug (commands): Adding command: core (0.053s)
Debug (commands): Adding command: verify-checksums in core Namespace (0.054s)
Debug (commands): Adding command: verify-checksums in plugin Namespace (0.055s)
Debug (commands): Adding command: export (0.056s)
Debug (commands): Adding command: config (0.058s)
Debug (commands): Adding command: core (0.06s)
Debug (commands): Adding command: eval (0.061s)
Debug (commands): Adding command: eval-file (0.061s)
Debug (commands): Adding command: import (0.062s)
Debug (commands): Adding command: media (0.063s)
Debug (commands): Adding command: package (0.065s)
Debug (commands): Adding command: cron (0.066s)
Debug (commands): Adding command: event in cron Namespace (0.067s)
Debug (commands): Adding command: schedule in cron Namespace (0.067s)
Debug (commands): Adding command: embed (0.068s)
Debug (commands): Adding command: fetch in embed Namespace (0.068s)
Debug (commands): Adding command: provider in embed Namespace (0.069s)
Debug (commands): Adding command: handler in embed Namespace (0.069s)
Debug (commands): Adding command: cache in embed Namespace (0.07s)
Debug (commands): Adding command: i18n (0.07s)
Debug (commands): Adding command: make-pot in i18n Namespace (0.071s)
Debug (commands): Adding command: make-json in i18n Namespace (0.072s)
Debug (commands): Deferring command: language core (0.073s)
Debug (commands): Deferring command: language plugin (0.073s)
Debug (commands): Deferring command: language theme (0.074s)
Debug (hooks): Immediately invoking on passed hook "after_add_command:site": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/language-command/language-command.php at line 39 (0.074s)
Debug (commands): Adding command: switch-language in site Namespace (0.074s)
Debug (commands): Adding command: language (0.074s)
Debug (hooks): Processing hook "after_add_command:language" with 3 callbacks (0.074s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.074s)
Debug (commands): Adding command: core in language Namespace (0.075s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.075s)
Debug (commands): Adding command: plugin in language Namespace (0.076s)
Debug (hooks): On hook "after_add_command:language": Closure in file phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/class-wp-cli.php at line 634 (0.076s)
Debug (commands): Adding command: theme in language Namespace (0.076s)
Debug (commands): Adding command: maintenance-mode (0.077s)
Debug (commands): Adding command: rewrite (0.078s)
Debug (commands): Adding command: rewrite (0.078s)
Debug (commands): Adding command: cap (0.079s)
Debug (commands): Adding command: role (0.08s)
Debug (commands): Adding command: search-replace (0.082s)
Debug (commands): Adding command: server (0.082s)
Debug (commands): Adding command: shell (0.083s)
Debug (commands): Adding command: super-admin (0.083s)
Debug (commands): Adding command: widget (0.085s)
Debug (commands): Adding command: sidebar (0.085s)
Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/cli.php (0.085s)
Debug (commands): Adding command: cli (0.087s)
Debug (commands): Adding command: cache in cli Namespace (0.088s)
Debug (commands): Adding command: alias in cli Namespace (0.088s)
Debug (bootstrap): Adding framework command: phar://wp-cli.phar/vendor/wp-cli/wp-cli/php/commands/help.php (0.088s)
Debug (commands): Adding command: help (0.089s)
Debug (bootstrap): No readable global config found (0.089s)
Debug (bootstrap): No project config found (0.089s)
Debug (bootstrap): argv: /usr/local/bin/wp core install --url=example.com --title="Example" --admin_user=admin [email protected] --skip-email --debug (0.09s)
Debug (bootstrap): ABSPATH defined: /home/circleci/wordpress/ (0.09s)
Debug (bootstrap): Set URL: example.com (0.09s)
Debug (bootstrap): Begin WordPress load (0.09s)
Debug (bootstrap): wp-config.php path: /home/circleci/wordpress/wp-config.php (0.09s)
circleci@142b5627c098:~/wordpress$
I've tried regenerating wp-config using wp config create
with just the bare minimum and visually inspected and it seems fine but no change.
wp config create
command? What doeswp config list
return you? Can you accessmysql -uUSER -pPASSWORD
from the command line?wp config create --dbhost=127.0.0.1 --dbname=wordpress --dbuser=root --path=wordpress/
And it retunsSuccess: Generated 'wp-config.php' file.
when I check the log. But I am also testing on a VM of my own with the same container but my setup is unfortunately slightly different so my command is:wp config create --dbhost=127.0.0.1 --dbname=wordpress --dbuser=root --path=wordpress/
Local I tried with no password as well but I though it may have been causing a problem. I have no issues using the mysql client to connect..circleci/config.yml
look like?