Running "wp acorn" Results in Database Error

I’m trying to run ACF-Composer with Sage 10 and having troubles on setup. It’s been a looong time since I used WP-CLI but I get the expected output running “wp --info” (copied below). However, running “wp acorn” results in Error: Error establishing a database connection.

I’m using LocalWP on my machine for my dev environment. Any ideas?

OS:     Darwin 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Shell:  /bin/zsh
PHP binary:     /usr/local/bin/php7.4.28
PHP version:    7.4.28
php.ini used:   /usr/local/etc/php/7.4/php.ini
MySQL binary:   
MySQL version:  
SQL modes:      
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       /Users/colinswinney/Local Sites/beaconwind/app/public
WP-CLI packages dir:    
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 2.6.0

This turned out to be a WP-CLI / LocalWP issue, not Acorn. By changing my wp-config as outlined in this article, the problem resolved.

3 Likes