mlutfy / hosting_wordpress

WordPress support for the Aegir project (front-end module).
12 stars 10 forks source link

wp cli doesnt seem to work as well as drush #12

Closed devekko closed 8 years ago

devekko commented 8 years ago
  1. wp cli doesnt seem to work as well as drush

aegir@arix:~/platforms/wordpress-core/sites$ wp PHP Notice: Undefined index: db_name in /var/aegir/.composer/vendor/wp-cli/wp-cli/php/wp-cli.php(23) : eval()'d code on line 18 PHP Notice: Undefined index: db_user in /var/aegir/.composer/vendor/wp-cli/wp-cli/php/wp-cli.php(23) : eval()'d code on line 21 PHP Notice: Undefined index: db_passwd in /var/aegir/.composer/vendor/wp-cli/wp-cli/php/wp-cli.php(23) : eval()'d code on line 24 PHP Notice: Undefined index: db_host in /var/aegir/.composer/vendor/wp-cli/wp-cli/php/wp-cli.php(23) : eval()'d code on line 27 PHP Notice: Undefined index: wp_content_dir in /var/aegir/.composer/vendor/wp-cli/wp-cli/php/wp-cli.php(23) : eval()'d code on line 30 Error:

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at . This could mean your host's database server is down.

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

devekko commented 8 years ago

o use 'wp', you have to use 'drush wp [...]'. This loads the db settings from the drush config.

devekko commented 8 years ago

aegir@arizmendix:~/platforms/wordpress-core/sites/wp2.arizmendix.devekko.net$ drush wp

NAME

  wp

DESCRIPTION

  Manage WordPress through the command-line.

SYNOPSIS

  wp <command>

SUBCOMMANDS

  cache               Manage the object cache.
  cap                 Manage user capabilities.
  cli                 Get information about WP-CLI itself.
  comment             Manage comments.
  core                Download, install, update and otherwise manage WordPress proper.
  cron                Manage WP-Cron events and schedules.
  db                  Perform basic database operations.
  eval                Execute arbitrary PHP code after loading WordPress.
  eval-file           Load and execute a PHP file after loading WordPress.
  export              Export cont

but "q" Drush command terminated abnormally due to an unrecoverable error. [error]

"ctrl + z" quits ok

but, if I do something like

aegir@arizmendix:~/platforms/wordpress-core/sites/wp2.arizmendix.devekko.net$ drush wp site url wp2.arizmendix.devekko.net
Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
Drush command terminated abnormally due to an unrecoverable error.    

or

aegir@arizmendix:~/platforms/wordpress-core/sites/wp2.arizmendix.devekko.net$ drush wp cli version
WP-CLI 0.20.0
Drush command terminated abnormally due to an unrecoverable error.           
devekko commented 8 years ago

I suspect my composer wp-cli drush links / sym links are not 100%

devekko commented 8 years ago

do I understand correctly, you've only got as far as using wp-cli to install?

https://github.com/wp-cli/wp-cli/issues/1924#issuecomment-122075194

devekko commented 8 years ago

did you check with https://github.com/WP-API/WP-API ?

I wonder about Aegir 4, Drupal 8, Backdrop etc

I wonder about some kind of Aegir 3 branch that acts as a bridge

was looking at Drush and Provision and thinking about calling Ansible from existing Provision / Drush code

with a view to some kind of Aegir Console built using Symfony

devekko commented 8 years ago

wrong post

mlutfy commented 8 years ago

Closing this issue since I don't think there is a bug. Feel free to re-open if necessary.