From 78cb6bf077c6ee7e1b2b5d346a47f2fcea4cdbf1 Mon Sep 17 00:00:00 2001 From: Matt Way Date: Mon, 12 Aug 2024 09:42:08 +1000 Subject: [PATCH] Always install wp-cli/restful package before bulk uploading --- bulk-upload-media.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bulk-upload-media.sh b/bulk-upload-media.sh index 8c6f144..5b1d2f0 100644 --- a/bulk-upload-media.sh +++ b/bulk-upload-media.sh @@ -11,6 +11,8 @@ WP_FLAGS="--allow-root --path=/var/www/html" path="$1" +wp package install wp-cli/restful $WP_FLAGS + if test -d "$path"; then echo "Found $path, starting upload." for file in "$path"/*.jpg; do