-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Description
Hi,
I'm using Bedrock as project boilerplate, so wp-config.php in WordPress root directory acts only as loader for actual configuration files that are included via require_once.
When running wp db size, I get:
Error: The site you have requested is not installed.
Run `wp core install`.For some reason, $table_prefix is not read from config. Here's the stack trace:
[06-Jun-2017 08:35:08 UTC] PHP Notice: Undefined variable: table_prefix in /[...]/wordpress/wp-settings.php on line 110
[06-Jun-2017 08:35:08 UTC] PHP Stack trace:
[06-Jun-2017 08:35:08 UTC] PHP 1. {main}() /[...]/wp-cli/wp-cli.phar:0
[06-Jun-2017 08:35:08 UTC] PHP 2. include() /[...]/wp-cli/wp-cli.phar:4
[06-Jun-2017 08:35:08 UTC] PHP 3. include() phar:///[...]/wp-cli/wp-cli.phar/php/boot-phar.php:8
[06-Jun-2017 08:35:08 UTC] PHP 4. WP_CLI\bootstrap() phar:///[...]/wp-cli/wp-cli.phar/php/wp-cli.php:23
[06-Jun-2017 08:35:08 UTC] PHP 5. WP_CLI\Bootstrap\LaunchRunner->process($state = class WP_CLI\Bootstrap\BootstrapState { private $state = array (...) }) phar:///[...]/wp-cli/wp-cli.phar/php/bootstrap.php:75
[06-Jun-2017 08:35:08 UTC] PHP 6. WP_CLI\Runner->start() phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Bootstrap/LaunchRunner.php:23
[06-Jun-2017 08:35:08 UTC] PHP 7. WP_CLI\Runner->_run_command() phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Runner.php:883
[06-Jun-2017 08:35:08 UTC] PHP 8. WP_CLI\Runner->run_command($args = array (0 => 'db', 1 => 'size'), $assoc_args = array (), $options = *uninitialized*) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Runner.php:328
[06-Jun-2017 08:35:08 UTC] PHP 9. WP_CLI\Dispatcher\Subcommand->invoke($args = array (), $assoc_args = array (), $extra_args = array ()) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Runner.php:321
[06-Jun-2017 08:35:08 UTC] PHP 10. call_user_func:{phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/Subcommand.php:401}(class Closure { public $static = array (...); public $parameter = array (...) }, array (), array ()) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/Subcommand.php:401
[06-Jun-2017 08:35:08 UTC] PHP 11. WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}($args = array (), $assoc_args = array ()) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/Subcommand.php:401
[06-Jun-2017 08:35:08 UTC] PHP 12. call_user_func:{phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/CommandFactory.php:67}(array (0 => class DB_Command { ... }, 1 => 'size'), array (), array ()) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/CommandFactory.php:67
[06-Jun-2017 08:35:08 UTC] PHP 13. DB_Command->size($args = array (), $assoc_args = array ()) phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Dispatcher/CommandFactory.php:67
[06-Jun-2017 08:35:08 UTC] PHP 14. WP_CLI\Runner->load_wordpress() /[...]/.wp-cli/packages/vendor/wp-cli/db-command/src/DB_Command.php:566
[06-Jun-2017 08:35:08 UTC] PHP 15. require() phar:///[...]/wp-cli/wp-cli.phar/php/WP_CLI/Runner.php:988
Some more observations:
- I have no problem running other commands,
db sizeis the only one causing this issue. - I'm using WP-CLI via phar downloadable, but I manually installed latest dev version of
db-commandpackage. - If files in
wp-config.phpare included viarequireinstead ofrequire_once, the issue is gone.
Enchiridion
Metadata
Metadata
Assignees
Labels
No labels