• 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.

    root@home-ubuntu:/home/MyStuff/wp/docker-wordpress# docker-compose run --rm wordpress-cli media import /var/www/html/wp-content/uploads/joe_photos/IMG_3112.JPG
    Creating new-site_wordpress-cli_run ... done
    Imported file '/var/www/html/wp-content/uploads/joe_photos/IMG_3112.JPG' as attachment ID 5427.
    Success: Imported 1 of 1 items.
    root@home-ubuntu:/home/MyStuff/wp/docker-wordpress# docker-compose run --rm wordpress-cli media import /var/www/html/wp-content/uploads/joe_photos/*
    Creating new-site_wordpress-cli_run ... done
    Warning: Unable to import file '/var/www/html/wp-content/uploads/joe_photos/*'. Reason: File doesn't exist.
    Error: No items imported.
    
    • This topic was modified 4 years, 7 months ago by Jan Dembowski.

The topic ‘WP-CLI Running In Docker Container Unable to Bulk Import Media’ is closed to new replies.