首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在运行wp核心安装时,wp-cli在255中默认失败。

在运行wp核心安装时,wp-cli在255中默认失败。
EN

WordPress Development用户
提问于 2019-05-20 03:48:44
回答 2查看 517关注 0票数 2

在一个Docker容器中工作(循环/php:最新),我正在与wp做斗争。当我试图运行wp core install时,我会得到255个退出代码的无声失败。我启用了--调试,希望获得更多的信息,但不幸的是,我看到的只是在阅读wp-config.php之后停止了。

代码语言:javascript
复制
circleci@142b5627c098:~/wordpress$ wp core install --url=example.com --title="Example" --admin_user=admin --admin_email=admin@example.com --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 --admin_email=admin@example.com --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$

我尝试过使用wp config create重新生成wp-config,并且只对其进行了最少的视觉检查,它看起来很好,但没有改变。

EN

回答 2

WordPress Development用户

回答已采纳

发布于 2019-05-20 14:07:59

我缺少了wp和/或WordPress所需的一些php扩展,但是没有错误输出说明。我猜是因为缺少的mysqli分机。

我使用一个WP-CLI命令来测试缺少扩展的基本容器,现在我的config.yml中有了sudo docker-php-ext-install gd sockets mysqli exif

感谢@leymannx链接他自己的回购,使我走上了正确的轨道。

票数 2
EN

WordPress Development用户

发布于 2019-05-20 05:46:24

阿!现在我刚刚看到,您在一个CircleCI容器中!我严重依赖CircleCI容器进行WordPress开发。我记得我曾经遇到过同样的问题。这是因为您的主机需要指定为127.0.0.1--dbhost如下所示:

代码语言:javascript
复制
$ wp config create --dbname=circle_test --dbuser=root --dbpass="" --dbhost=127.0.0.1

我也有一个工作样本回购现场,这可能有助于您进一步:https://github.com/leymannx/wordpress-circleci-behat。也许你可以检查你的.circleci/config.yml与从这个回购找到罪魁祸首。

票数 0
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://wordpress.stackexchange.com/questions/338249

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档