I'm using WP CLI to manage the cron tasks of my Wordpress installation. Was working well, but now I'm getting the error:
Warning: Some code is trying to do a URL redirect. Backtrace:
#0 WP_CLI\Utils\wp_redirect_handler(https://example.com.br) called at [/home/user/public_html/wp-includes/class-wp-hook.php:289]
#1 WP_Hook->apply_filters(https://example.com.br, Array ([0] => https://example.com.br,[1] => 301)) called at [/home/user/public_html/wp-includes/plugin.php:206]
#2 apply_filters(wp_redirect, https://example.com.br, 301) called at [/home/user/public_html/wp-includes/pluggable.php:1257]
#3 wp_redirect(https://example.com.br, 301) called at [/home/user/public_html/wp-content/plugins/w3-total-cache/PgCache_Plugin.php:214]
#4 W3TC\PgCache_Plugin->redirect_on_foreign_domain() called at [/home/user/public_html/wp-includes/class-wp-hook.php:287]
#5 WP_Hook->apply_filters(, Array ([0] => )) called at [/home/user/public_html/wp-includes/class-wp-hook.php:311]
#6 WP_Hook->do_action(Array ([0] => )) called at [/home/user/public_html/wp-includes/plugin.php:478]
#7 do_action(init) called at [/home/user/public_html/wp-settings.php:546]
#8 require(/home/user/public_html/wp-settings.php) called at [phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1237]
#9 WP_CLI\Runner->load_wordpress() called at [phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1158]
#10 WP_CLI\Runner->start() called at [phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:23]
#11 WP_CLI\Bootstrap\LaunchRunner->process(WP_CLI\Bootstrap\BootstrapState Object ([WP_CLI\Bootstrap\BootstrapStatestate] => Array ())) called at [phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:74]
#12 WP_CLI\bootstrap() called at [phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:27]
#13 include(phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php) called at [phar:///usr/local/bin/wp/php/boot-phar.php:11]
#14 include(phar:///usr/local/bin/wp/php/boot-phar.php) called at [/usr/local/bin/wp:4]
Any tips?
Googling, I realized that the problem was W3 Total Cache plugin, and used the option:
I'ts working now:
should work with any other plugin showing the same error