Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to specify DB creds on the command line? #1927

Closed
theMikeD opened this issue Jul 16, 2015 · 2 comments
Closed

Is there a way to specify DB creds on the command line? #1927

theMikeD opened this issue Jul 16, 2015 · 2 comments

Comments

@theMikeD
Copy link

I use a system by which wp-config.php is in git, but the db creds are not; they are loaded via an include as Mark suggests here

https://github.com/markjaquith/WordPress-Skeleton

wp-cli fails with such a setup because it's reading in the wp-config.php file directly (as opposed to after having been washed through php first) and it's looking for something that's not in the file.

This page

http://wp-cli.org/config/

seems to imply that the DB creds can be put into a wp-cli.local.yml file using dbuser and dbpass. I've tried it though and it doesn't work.

Is there a trick to it, or is this something that will not work at all? I'm def. not looking for a debate on the merits of doing things this way; take that up with Mark if you like.

@theMikeD
Copy link
Author

Closing, because I think the issue is elsewhere. Sorry for the noise. FTR this is related to WP-CLI not populating $_SERVER

@danielbachhuber
Copy link
Member

wp-cli fails with such a setup because it's reading in the wp-config.php file directly (as opposed to after having been washed through php first) and it's looking for something that's not in the file.

See also #1631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants