This is a very common wp-cli error while using MAMP. I installed wp-cli, exported the php version MAMP is using to the WP_CLI_PHP variable as recommended by the instructions. The output of $ wp --info
is:
PHP binary: /Applications/MAMP/bin/php/php5.6.2/bin/php
PHP version: 5.6.2
php.ini used: /Applications/MAMP/bin/php/php5.6.2/conf/php.ini
WP-CLI root dir: phar://wp-cli.phar
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.20.1
I've followed along with all the solutions for this, but I'm still getting a timeout and error in connecting to the database. I also have MAMP running while running wp-cli commands. Any ideas?