Title: wp-config and wp-cli issue
Last modified: October 18, 2019

---

# wp-config and wp-cli issue

 *  [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * (@jimmy987654321)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/)
 * Hi All,
    I have installed wp-cli. The command “wp” works but any subcommand indicates
   that “This does not seem to be a wordpress install”
 * Running: wp –path=/opt/bitnami/apps/wordpress/htdocs info returns
 * PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/php/WP_CLI/
   Runner.php(982) : eval()’d code on line 90
    PHP Notice: Undefined index: HTTP_HOST
   in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(982) : eval()’d code on line
   91 PHP Fatal error: Uncaught Error: Call to undefined function add_filter() in
   phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(982) : eval()’d code:110 Stack
   trace: #0 phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(982): eval() #1 phar:///
   usr/local/bin/wp/php/WP_CLI/Runner.php(945): WP_CLI\Runner->load_wordpress() #
   2 phar:///usr/local/bin/wp/php/wp-cli.php(21): WP_CLI\Runner->start() #3 phar:///
   usr/local/bin/wp/php/boot-phar.php(5): include(‘phar:///usr/loc…’) #4 /usr/local/
   bin/wp(4): include(‘phar:///usr/loc…’) #5 {main} thrown in phar:///usr/local/
   bin/wp/php/WP_CLI/Runner.php(982) : eval()’d code on line 110
 * I suspect that the lightsail specific install of php and wordpress may be the
   issue.
 * I would appreciate your help to resolve.

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9220876)
 * Are you in the root directory of your WP site when you run the wp-cli commands?
 *  Thread Starter [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * (@jimmy987654321)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9220892)
 * Yes I’m in /opt/bitnami/apps/wordpress/htdocs
 *  Thread Starter [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * (@jimmy987654321)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9220918)
 * Apologies, that’s probably not clear. When I run the command wp –info from /opt/
   bitnami/apps/wordpress/htdocs then I get expected results.
 * When I run “wp plugin list” I get the error above.
 *  Thread Starter [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * (@jimmy987654321)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9220954)
 * I have tried this now on AWS lightsail as well as on the Bitnami WordPress AMI
   provided in the market place with the same results.
 * I can comment out the “require_once(ABSPATH , ‘wp-settings.php’); line and see
   the list of plugins. However it still shows the errors:
 * PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/php/WP_CLI/
   Runner.php(982) : eval()’d code on line 90
    PHP Notice: Undefined index: HTTP_HOST
   in phar:///usr/local/bin/wp/php/WP_CLI/Runner.php(982) : eval()’d code on line
   91
 * so it would seem to be related to the regex of the abspath statement but after
   that I’m lost
 *  Thread Starter [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * (@jimmy987654321)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9223263)
 * Does anyone know where in wp-cli.phar the regex statement is that strips the 
   abspath out of wp-config.php

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

The topic ‘wp-config and wp-cli issue’ is closed to new replies.

## Tags

 * [ABSPATH](https://wordpress.org/support/topic-tag/abspath/)
 * [Lightsail](https://wordpress.org/support/topic-tag/lightsail/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)
 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [jimmy987654321](https://wordpress.org/support/users/jimmy987654321/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/wp-config-and-wp-cli-issue/#post-9223263)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
