Avoid use of @WP_CLI::get_runner()->load_wordpress();
in wp db *
commands
#50
Labels
Milestone
wp db search
(and otherwp db *
commands) call@WP_CLI::get_runner()->load_wordpress();
because WP-CLI executeswp db *
commands afterwp-config.php
has loaded but before the rest of WordPress has loaded: https://github.com/wp-cli/wp-cli/blob/d9d405a4ca01ba23e80277b8cb9000857e84e0cd/php/WP_CLI/Runner.php#L875Calling
@WP_CLI::get_runner()->load_wordpress();
to avoid redefinition of constants inwp-config.php
is a hack. Instead, these commands should continue loading WordPress without loadingwp-config.php
again.Related #15
The text was updated successfully, but these errors were encountered: