-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cannot bulk import media #114
Comments
@crtl The
So there's nothing that WP-CLI can do here, as the problem already occurs before you're even hitting the WP-CLI tool. However, I notice now that the documentation says the command would support glob capabilities, which doesn't seem to be the case as far as I can see from the source code. If that would be the case, you could provide the "unglobbed" string to
So a solution to this problem would be to add actual globbing support to the command and then handling the expansion within PHP memory. |
The solution would be to support passing directory names and a recursive option to the command. |
Directory names are not precise enough for this. Actual globbing would be preferable, and PHP already supports this out of the box, so it'd be easier to implement as well. |
How can you decide whats precise and what not. |
The goal is to make this more useful by allowing you to control what to include at the WP-CLI level, instead of relying on the shell. But adding folders and a recursive option is both more complicated and less flexible than just passing the provided argument through the PHP |
Was getting an error while attempting to bulk import. Then I realized that I had the path in quotes. The docs show an example for bulk imports with an unquoted path. Removing the quotes fixed the issue. It's not a huge deal, but I was expecting the string path to work too. Any update on this? |
Bug Report
I have around 2.6k images in a subdirectory inside
wp-content/uploads/product_images
.I tried to import them but get the following error:
The command evaluates the blob and just appends all files as arguments for the php command which seems to be too long for php to handle.
The text was updated successfully, but these errors were encountered: