Closed imjoep closed 3 years ago
@imjoep That is not an issue with WP-CLI, but with your shell. When you use *
, your shell will expand this to include all the matching files within the filesystem that you're executing this command - which is your host system, not your docker container.
WP-CLI has no knowledge about the globbing (the use of wildcards like *
), this is handled by the shell. Using that within the docker container will require shell code to run within the container, like a short bash script.
YES!!!! 2 days of troubleshooting resolved in about 10 minutes.
For future reference:
docker-compose run --rm wordpress-cli bash
wp media import /path/to/files/*
@schlessera I noticed it takes all files and imports them, whether they have been previously imported or not. Is there a way to skip previously imported files?
I am attempting to import media via WP-CLI that I uploaded to the uploads directory via ftp. I have changed the owner of the files to www-data.
When I run import of a single file, it works successfully but when I add an “*” it fails, like it thinks that is part of the filename.
Here is my docker-compose file