-
Notifications
You must be signed in to change notification settings - Fork 37
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
wp config create - Too many positional arguments #55
Comments
@adampatterson This is just part of the normal shell behavior. If you want to use such characters inside of a value, you have to "quote" the value to let the shell know that it should just accept the characters as part of the value, instead of interpreting them. So, |
OK cool, But is this expected for usernames and passwords? I didn't have any spaces and it still had issues. Unless the wrapping the dbhost fixed it and I added single quotes to the rest of the arguments. |
There are other characters that need to be quoted or escaped as well. The exact list of characters depends on the shell and environment you're using. Here's a non-exhaustive list of characters that generally need to be escaped or quoted in the shell:
|
Thanks for the tips/help! My passwords did contain special characters so it makes sense then. |
I just got this error trying to restrict posts to just those with an ID less than something. I used ID<## |
Having similar issue. I know this is how it is supposed to work, but neither using single quotes, nor double quotes, nor escaping spaces manually with backslashes worked. Here are some permutations of my With no escaping: wp core install --title=EH SSH Install Test --admin_user=myadmin [email protected] --prompt=admin_password < admin_password.txt --color With quoted escaped double quotes: wp core install --title="\"EH SSH Install Test\"" --admin_user=myadmin [email protected] --prompt=admin_password < admin_password.txt --color With single quotes: wp core install --title='EH SSH Install Test' --admin_user=myadmin [email protected] --prompt=admin_password < admin_password.txt --color With double quotes: wp core install --title="EH SSH Install Test" --admin_user=myadmin [email protected] --prompt=admin_password < admin_password.txt --color |
Ubuntu 14
CLI 1.5
PHP 5.5.9
This might be my lack of knowledge in the command line.
But
will result in Too many positional arguments
Placing DB user, password, and host in single quotes worked. The same goes for the
core install
command.I didn't see this in any of the docs or the CLI help text.
https://developer.wordpress.org/cli/commands/config/create/
https://developer.wordpress.org/cli/commands/core/install/
The text was updated successfully, but these errors were encountered: