Hi @tedw,
If you’re wanting to run WP-CLI from your computer and not inside the site container, you can try the following:
- Open
wp-config.phpinapp/public - Add a conditional for the
DB_HOSTconstant. The value needs to be whatever the “Remote Host” of the database is followed by the “Remote Port” so it’ll look something like:
/** MySQL hostname */
if ( defined( 'WP_CLI' ) && WP_CLI ) {
define( 'DB_HOST', '192.168.65.100:4006' );
} else {
define( 'DB_HOST', 'localhost' );
}