Title: ﻿PHP Warning with WP CLI
Last modified: June 13, 2017

---

# ﻿PHP Warning with WP CLI

 *  [DreamOn11](https://wordpress.org/support/users/dreamon11/)
 * (@dreamon11)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/%ef%bb%bfphp-warning-with-wp-cli-2/)
 * Hi,
 * When using WP CLI commands such as `wp option get wp_template_root`, the plugin
   return notices which prevent to get expected data from external scripts:
 *     ```
       admin@xxx:/srv/www/xxx.net/current$ wp option get wp_template_root
       PHP Notice:  Undefined index: HTTP_HOST in /srv/www/xxx.net/current/web/app/plugins/wp-super-cache/wp-cache-base.php on line 6
       Notice: Undefined index: HTTP_HOST in /srv/www/xxx.net/current/web/app/plugins/wp-super-cache/wp-cache-base.php on line 6
       ```
   
 * Can you fix it?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Thread Starter [DreamOn11](https://wordpress.org/support/users/dreamon11/)
 * (@dreamon11)
 * [8 years, 12 months ago](https://wordpress.org/support/topic/%ef%bb%bfphp-warning-with-wp-cli-2/#post-9224340)
 * It seems it can be fixed with: [https://stackoverflow.com/a/933375](https://stackoverflow.com/a/933375)

Viewing 1 replies (of 1 total)

The topic ‘﻿PHP Warning with WP CLI’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [DreamOn11](https://wordpress.org/support/users/dreamon11/)
 * Last activity: [8 years, 12 months ago](https://wordpress.org/support/topic/%ef%bb%bfphp-warning-with-wp-cli-2/#post-9224340)
 * Status: not resolved