Title: PHP Notices in WP-CLI
Last modified: November 22, 2019

---

# PHP Notices in WP-CLI

 *  Resolved [daleharrison](https://wordpress.org/support/users/daleharrison/)
 * (@daleharrison)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-notices-in-wp-cli/)
 * When attempting to run WP-CLI commands on a site that has this plugin installed,
   the following PHP notice appears:
 * `Undefined index: HTTP_HOST in public_html/wp-content/plugins/simple-301-redirects/
   wp-simple-301-redirects.php on line 271`
 * Based on this, the plugin should probably either account for when `HTTP_HOST`
   is not set, or should be able to detect whether WP-CLI is in use and respond 
   accordingly.
 * Here’s an example of detecting WP-CLI usage: [https://github.com/wp-cli/wp-cli/issues/4073#issuecomment-302412853](https://github.com/wp-cli/wp-cli/issues/4073#issuecomment-302412853)
    -  This topic was modified 6 years, 6 months ago by [daleharrison](https://wordpress.org/support/users/daleharrison/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Rogier Lankhorst](https://wordpress.org/support/users/rogierlankhorst/)
 * (@rogierlankhorst)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-notices-in-wp-cli/#post-12167051)
 * Hi [@daleharrison](https://wordpress.org/support/users/daleharrison/),
 * Really Simple SSL takes this possibility into account, but apparently WP Simple
   301 redirects does not, which is where the php notice is coming from.
 * I’d recommend to contact the author of this redirect plugin.
 * Let me know if you have any questions.
 *  Thread Starter [daleharrison](https://wordpress.org/support/users/daleharrison/)
 * (@daleharrison)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/php-notices-in-wp-cli/#post-12173235)
 * My apologies, I got my “Simple” plugin wires crossed as I am using both yours
   and theirs.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Notices in WP-CLI’ is closed to new replies.

 * ![](https://ps.w.org/really-simple-ssl/assets/icon-256x256.png?rev=2839720)
 * [Really Simple Security - Simple and Performant Security (formerly Really Simple SSL)](https://wordpress.org/plugins/really-simple-ssl/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/really-simple-ssl/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/really-simple-ssl/)
 * [Active Topics](https://wordpress.org/support/plugin/really-simple-ssl/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/really-simple-ssl/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/really-simple-ssl/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [daleharrison](https://wordpress.org/support/users/daleharrison/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/php-notices-in-wp-cli/#post-12173235)
 * Status: resolved