WP-CLI (wp command line tool) error when itsec is active
-
Hi Guys,
Is there a specific setting or something that needs to be flagged in order for wp-cli to work as expected while better-wp-security is active?We are on litespeed, php7.2;(with settings like hide back-end, force ssl always) and when running a wp-cli command it errors:
Warning: Some code is trying to do a URL redirect. Backtrace:
or something like
Notice: Undefined index: HTTP_HOST in /home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php on line 131 Warning: Some code is trying to do a URL redirect. Backtrace: #0 WP_CLI\Utils\wp_redirect_handler(https://) called at [/home/xxxxx/public_html/wp-includes/class-wp-hook.php:288] #1 WP_Hook->apply_filters(https://, Array ([0] => https://,[1] => 301)) called at [/home/xxxxx/public_html/wp-includes/plugin.php:203] #2 apply_filters(wp_redirect, https://, 301) called at [/home/xxxxx/public_html/wp-includes/pluggable.php:1199] #3 wp_redirect(https://, 301) called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php:132] #4 ITSEC_SSL->redirect_to_https() called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php:73] #5 ITSEC_SSL->init() called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php:12] #6 ITSEC_SSL->__construct() called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php:17] #7 ITSEC_SSL::get_instance() called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php:205] #8 require_once(/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/class-itsec-ssl.php) called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/active.php:9] #9 include_once(/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules/ssl/active.php) called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules.php:583] #10 ITSEC_Modules::load_module_file(active.php, Array ([0] => ban-users,[1] => brute-force,[2] => network-brute-force,[3] => wordpress-tweaks,[4] => ssl,[5] => security-check,[6] => global,[7] => notification-center,[8] => privacy,[9] => admin-user,[10] => content-directory,[11] => database-prefix,[12] => core,[13] => file-permissions,[14] => hide-backend,[15] => password-requirements,[16] => strong-passwords,[17] => wordpress-salts,[18] => file-writing,[19] => malware,[20] => pro-module-upsells)) called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/modules.php:602] #11 ITSEC_Modules::run_active_modules() called at [/home/xxxxx/public_html/wp-content/plugins/better-wp-security/core/core.php:158] #12 ITSEC_Core->continue_init() called at [/home/xxxxx/public_html/wp-includes/class-wp-hook.php:286] #13 WP_Hook->apply_filters(, Array ([0] => )) called at [/home/xxxxx/public_html/wp-includes/class-wp-hook.php:310] #14 WP_Hook->do_action(Array ([0] => )) called at [/home/xxxxx/public_html/wp-includes/plugin.php:453] #15 do_action(plugins_loaded) called at [/home/xxxxx/public_html/wp-settings.php:327] #16 require(/home/xxxxx/public_html/wp-settings.php) called at [phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1188] #17 WP_CLI\Runner->load_wordpress() called at [phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1111] #18 WP_CLI\Runner->start() called at [phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23] #19 WP_CLI\Bootstrap\LaunchRunner->process(WP_CLI\Bootstrap\BootstrapState Object ([WP_CLI\Bootstrap\BootstrapStatestate] => Array ())) called at [phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php:74] #20 WP_CLI\bootstrap() called at [phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php:23] #21 include(phar:///home/xxxxx/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php) called at [phar:///home/xxxxx/wp-cli.phar/php/boot-phar.php:11] #22 include(phar:///home/xxxxx/wp-cli.phar/php/boot-phar.php) called at [/home/xxxxx/wp-cli.phar:4]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘WP-CLI (wp command line tool) error when itsec is active’ is closed to new replies.