Problem running tasks with WP-CLI
-
Hello,
Thank you in advance for the time you spent creating and maintaining the plugin.
I need to run cron jobs in the background, in CLI mode using wp-cli.
Unfortunately the plugin does not distinguish and tries to redirect to https.I would like the plugin to test if:
!define( ‘WP_CLI’, true );and others test if necessary.
At this point I have to ignore the plugin, and this is not practical if we are dealing with many domains/sites.
The output that is generated when I run commands with wp-cli:
Warning: Some code is trying to do a URL redirect. Backtrace: #0 WP_CLI\Utils\wp_redirect_handler(https://) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/class-wp-hook.php:289] #1 WP_Hook->apply_filters(https://, Array ([0] => https://,[1] => 301)) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/plugin.php:212] #2 apply_filters(wp_redirect, https://, 301) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/pluggable.php:1257] #3 wp_redirect(https://, 301) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-content/plugins/one-click-ssl/ssl.php:530] #4 OCSSL->redirect(https://) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-content/plugins/one-click-ssl/ssl.php:491] #5 OCSSL->check_ssl() called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/class-wp-hook.php:287] #6 WP_Hook->apply_filters(, Array ([0] => )) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/class-wp-hook.php:311] #7 WP_Hook->do_action(Array ([0] => )) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-includes/plugin.php:484] #8 do_action(wp_loaded) called at [/var/www/vhosts/example-domain.com/httpdocs/wp-settings.php:579] #9 require(/var/www/vhosts/example-domain.com/httpdocs/wp-settings.php) called at [phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1271] #10 WP_CLI\Runner->load_wordpress() called at [phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1192] #11 WP_CLI\Runner->start() called at [phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23] #12 WP_CLI\Bootstrap\LaunchRunner->process(WP_CLI\Bootstrap\BootstrapState Object ([WP_CLI\Bootstrap\BootstrapStatestate] => Array ())) called at [phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php:77] #13 WP_CLI\bootstrap() called at [phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php:27] #14 include(phar:///usr/local/bin/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php) called at [phar:///usr/local/bin/wp-cli/php/boot-phar.php:11] #15 include(phar:///usr/local/bin/wp-cli/php/boot-phar.php) called at [/usr/local/bin/wp-cli:4]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem running tasks with WP-CLI’ is closed to new replies.