Title: Disable redirection checking on WP_CLI
Last modified: July 3, 2017

---

# Disable redirection checking on WP_CLI

 *  Resolved [weDevs](https://wordpress.org/support/users/wedevs/)
 * (@wedevs)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/disable-redirection-checking-on-wp_cli/)
 * When running commands from WP-CLI, there is no HTTP_HOST variable available in
   the environment. So checking this in the plugin’s code is logging the PHP warnings
   to the `debug.log` file.
 *     ```
       [03-Jul-2017 06:07:50 UTC] PHP Notice:  Undefined index: HTTP_HOST in /Users/tareq/Development/htdocs/wordpress/wp-content/plugins/simple-301-redirects/wp-simple-301-redirects.php on line 271
       [03-Jul-2017 06:07:50 UTC] PHP Stack trace:
       [03-Jul-2017 06:07:50 UTC] PHP   1. {main}() /Users/tareq/bin/wp:0
       [03-Jul-2017 06:07:50 UTC] PHP   2. include() /Users/tareq/bin/wp:4
       [03-Jul-2017 06:07:50 UTC] PHP   3. include() phar:///Users/tareq/bin/wp/php/boot-phar.php:8
       [03-Jul-2017 06:07:50 UTC] PHP   4. WP_CLI\bootstrap() phar:///Users/tareq/bin/wp/php/wp-cli.php:23
       [03-Jul-2017 06:07:50 UTC] PHP   5. WP_CLI\Bootstrap\LaunchRunner->process() phar:///Users/tareq/bin/wp/php/bootstrap.php:75
       [03-Jul-2017 06:07:50 UTC] PHP   6. WP_CLI\Runner->start() phar:///Users/tareq/bin/wp/php/WP_CLI/Bootstrap/LaunchRunner.php:23
       [03-Jul-2017 06:07:50 UTC] PHP   7. WP_CLI\Runner->load_wordpress() phar:///Users/tareq/bin/wp/php/WP_CLI/Runner.php:925
       [03-Jul-2017 06:07:50 UTC] PHP   8. require() phar:///Users/tareq/bin/wp/php/WP_CLI/Runner.php:988
       [03-Jul-2017 06:07:50 UTC] PHP   9. do_action() /Users/tareq/Development/htdocs/wordpress/wp-settings.php:448
       [03-Jul-2017 06:07:50 UTC] PHP  10. WP_Hook->do_action() /Users/tareq/Development/htdocs/wordpress/wp-includes/plugin.php:453
       [03-Jul-2017 06:07:50 UTC] PHP  11. WP_Hook->apply_filters() /Users/tareq/Development/htdocs/wordpress/wp-includes/class-wp-hook.php:323
       [03-Jul-2017 06:07:50 UTC] PHP  12. Simple301Redirects->redirect() /Users/tareq/Development/htdocs/wordpress/wp-includes/class-wp-hook.php:298
       [03-Jul-2017 06:07:50 UTC] PHP  13. Simple301Redirects->get_address() /Users/tareq/Development/htdocs/wordpress/wp-content/plugins/simple-301-redirects/wp-simple-301-redirects.php:214
       ```
   

Viewing 1 replies (of 1 total)

 *  [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/disable-redirection-checking-on-wp_cli/#post-9283812)
 * Hi [@wedevs](https://wordpress.org/support/users/wedevs/),
 * You can use `--skip-plugins=simple-301-redirects` to skip the plugin from loading
   when using WP-CLI.
 * For more details on configuration, see [https://make.wordpress.org/cli/handbook/config/](https://make.wordpress.org/cli/handbook/config/)

Viewing 1 replies (of 1 total)

The topic ‘Disable redirection checking on WP_CLI’ is closed to new replies.

 * ![](https://ps.w.org/simple-301-redirects/assets/icon-256x256.jpg?rev=2783827)
 * [Simple 301 Redirects By BetterLinks - Easy WordPress Redirect Manager for Redirects, 404 Error Log & More](https://wordpress.org/plugins/simple-301-redirects/)
 * [Support Threads](https://wordpress.org/support/plugin/simple-301-redirects/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-301-redirects/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-301-redirects/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-301-redirects/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 1 reply
 * 2 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/disable-redirection-checking-on-wp_cli/#post-9283812)
 * Status: resolved