wp cli - wp-cli configuration in php?

is pretty good, but I'd like to have some more logic in my configuration.Is there a standard way for this?For dru

is pretty good, but I'd like to have some more logic in my configuration. Is there a standard way for this?

For drush I have .drush/aliases.drushrc.php, which includes scripts from various Drupal repositories, which in turn contain the logic to handle various sites and variations (production, development). I'd like to have something similar for wp-cli, and YAML doesn't provide me with the right tools for what I want.

https://make.wordpress/cli/handbook/config/#config-files is pretty good, but I'd like to have some more logic in my configuration. Is there a standard way for this?

For drush I have .drush/aliases.drushrc.php, which includes scripts from various Drupal repositories, which in turn contain the logic to handle various sites and variations (production, development). I'd like to have something similar for wp-cli, and YAML doesn't provide me with the right tools for what I want.

Share Improve this question asked Jun 5, 2019 at 13:53 thethe 1,5682 gold badges13 silver badges32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The WP CLI aliases are mostly for context. WP CLI uses Drush as a source of inspiration, but Drush has a much more robust implementation of aliases.

If it were me, I would include other scripts and complex logic as a custom command.

WP_CLI::add_command( 'core foo', 'Foo_Command' );

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745435462a4627586.html

相关推荐

  • wp cli - wp-cli configuration in php?

    is pretty good, but I'd like to have some more logic in my configuration.Is there a standard way for this?For dru

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信