-
Notifications
You must be signed in to change notification settings - Fork 975
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
Installing/updating plugins via URL that don't have .zip in filename #2170
Comments
Try to use quotes on the command line
|
@szepeviktor that doesn't help, wp-cli is looking for a filename that ends in .zip only, to differentiate between a slug and a local/remote zip file. |
Here's the check: https://github.com/wp-cli/wp-cli/blob/master/php/WP_CLI/CommandWithUpgrade.php#L126 @coreyworrell When you make a
Also, as a short-term workaround, you can download the file using wget or curl, and then install. |
@danielbachhuber yes, the headers are set just like that example. If you want to save a HEAD request though, you could simply check for a |
I would say that you could also just set a flag that explicitly states that the argument you're passing is a remote url, but that won't help much when doing |
But you can also install a zip file from the same directory WP-CLI already accommodates zip archives behind access keys (e.g. As I mentioned before, you can use
|
You're excluding many external/commercial plugins with this though. And yes the workaround works manually, but when doing Instead of checking for |
Ah, I didn't realize this caused premium plugin updates to fail.
This is an imprecise check. We'll need to do a HEAD request on the URL, which I think is more precise than checking the extension because it also checks whether the remote asset is available. |
I agree. But it doesn't have to be wp-cli's responsibility too check if a resource is available before attempting a download. One more idea could be to check if the passed string contains |
@danielbachhuber any update on when this will be handled? I can submit pull request if needed. Thanks. |
Nope.
Please do! Here's our contributing directions: https://github.com/wp-cli/wp-cli/blob/master/CONTRIBUTING.md |
Seems to be an issue where wp-cli won't install or update a plugin via URL when using a "dynamic" URL that doesn't look like a .zip file URL, ie: http://site.com/download.php?file=blah&key=whatever
The text was updated successfully, but these errors were encountered: