wp-cli Installation

Ich habe 0h-my-zsh installiert; dann wp-cli, ändere .zshrc datei und schrieb:

# FIX PHP MAMP for WP-CLI export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:$PATH export PATH=$PATH:/Applications/MAMP/Library/bin/ 

wegen mamp (was ich benutze).

Dann gehe in ein WordPress Verzeichnis und versuche ein Plugin zu installieren:

 wp plugin install *name-of-the-plugin*. 

aber ich habe eine Fehlermeldung:

 Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Applications/MAMP/htdocs/Wp theme dev/wp-includes/wp-db.php on line 1452 Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Applications/MAMP/htdocs/Wp theme dev/wp-includes/wp-db.php on line 1482 Warning: mysql_connect(): No such file or directory in /Applications/MAMP/htdocs/Wp theme dev/wp-includes/wp-db.php on line 1482 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 localhost. This could mean your host's database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

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.

Ich tippte

 echo $PATH 

und hier ist das Ergebnis:

 /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 

dann,

 wp --info : PHP binary: /usr/bin/php PHP version: 5.5.27 php.ini used: WP-CLI root dir: phar://wp-cli.phar WP-CLI global config: WP-CLI project config: WP-CLI version: 0.19.2 

Ich bin ein bisschen verwirrt. wo habe ich falsch gemacht?

Solutions Collecting From Web of "wp-cli Installation"