Multisite Privacy breaks WP-CLI

Hi, when we have the Multisite Plugin enabled and in use it will break WP-CLI. Privacy Plugin is configured to allow access only for logged in users ("Visitors must have a login").

Doing basic check like wp core version will work. Anything else will fail like:

wp core check-update

Warning: Some code is trying to do a URL redirect. Backtrace:
#0  WP_CLI\Utils\wp_redirect_handler(https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F)
#1  call_user_func_array(WP_CLI\Utils\wp_redirect_handler, Array ([0] => https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F)) called at [/var/www/wp-includes/plugin.php:235]
#2  apply_filters(wp_redirect, https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F, 302) called at [/var/www/wp-includes/pluggable.php:1208]
#3  wp_redirect(https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F) called at [/var/www/wp-content/plugins/sitewide-privacy-options/sitewide-privacy-options.php:501]
#4  spo_redirect(https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F) called at [/var/www/wp-content/plugins/sitewide-privacy-options/sitewide-privacy-options.php:566]
#5  additional_privacy()
#6  call_user_func_array(additional_privacy, Array ([0] => )) called at [/var/www/wp-includes/plugin.php:525]
#7  do_action(wp_loaded) called at [phar:///usr/local/bin/wp/php/wp-settings-cli.php:427]
#8  require(phar:///usr/local/bin/wp/php/wp-settings-cli.php) called at [phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:736]
#9  WP_CLI\Runner->load_wordpress() called at [phar:///usr/local/bin/wp/php/WP_CLI/Runner.php:697]
#10 WP_CLI\Runner->start() called at [phar:///usr/local/bin/wp/php/wp-cli.php:21]
#11 include(phar:///usr/local/bin/wp/php/wp-cli.php) called at [phar:///usr/local/bin/wp/php/boot-phar.php:5]
#12 include(phar:///usr/local/bin/wp/php/boot-phar.php) called at [/usr/local/bin/wp:4]
    <script type="text/javascript">
        window.location = 'https://DOMAIN/wp-login.php?privacy=3&redirect_to=http%3A%2F%2FDOMAIN%2F';

Would be great to have this fixed. Current workaround is to disable the plugin, perform maintenance and reactivate it. That's not a very good workaround though...

Best Regards,


  • Rupok
    • Support Ninja

    Hi Jan

    Hope you had a wonderful day.

    Our plugin developer can give you better idea on this. I'm flagging our plugin developer here so he can give you best idea regarding this. Please keep in mind, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    Have a nice day. Cheers!

      • New Recruit

      We've encountered the same problem. We do not consider this "fix" to be a real solution to the problem. I hope you are not considering this ticket "done". A Plugin that should actually just do some redirect on routing should not break the kernel itself for the WP-CLI. Do you have any plans on fixing this?



  • Panos
    • SLS


    So sorry for taking us such a long time to get back to you. This task has slipped through

    I tried replicating this in one of my test sites by running simple comands as in the description of this thread without issues. It also updated akismet too with
    wp plugin update akismet

    Could we have a closer look if you still need assistance on this? Could you please send in admin, cpanel/or ssh and ftp info so we check?

    You can send that privately through our contact form:

    Send in:Subject: "Attn: Panos Lyrakis"

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    (and port if required)

    - CPanel or ssh

    - link back to this thread for reference


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.