I've installed a version of Wordpress using composer, and modified the default folders for the content (/wp-content) and the core (/wp).
My wp-config.php gets its DB_NAME, DB_USERNAME, DB_PASSWORD from environment variables defined in the .htaccess file.
I am able to connect to my wordpress instance using my browser, so the connection information in there is fine.
I have not managed to get wp-cli to run on this instance. wp-cli --debug outputs:
Debug (bootstrap): No readable global config found (0.014s) Debug (bootstrap): No project config found (0.016s) Debug (bootstrap): No package autoload found to load. (0.261s) Debug (bootstrap): ABSPATH defined: /path/to/core/ (0.272s) Debug (bootstrap): Begin WordPress load (0.288s) Debug (bootstrap): wp-config.php path: /path/to/wp-config.php (0.292s) Error: Error establishing a database connection
(I've double checked these paths and they are correct)
I keep getting that same error. I've tried installing a clean instance using composer, but this time :
- without any plugin
- without any theme
- by defining the DB_NAME, DB_USERNAME, DB_PASSWORD directly in the wp-config.php file rather than getting those from env. variables.
- but I kept the custom folder structure /wp for the core and /wp-content for the content
Still the same error... Am I missing something ? Is it the custom folder structure that wp-cli doesn't like ?
Executing wp-cli --info outputs this : PHP binary: /usr/bin/php PHP version: 5.5.36 php.ini used: WP-CLI root dir: phar://wp-cli.phar WP-CLI packages dir: WP-CLI global config: WP-CLI project config: WP-CLI version: 0.24.1
I'm on Max OS X El Capitan.
Thanks a lot for your help,