File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ wp media
5959Creates attachments from local files or URLs.
6060
6161~~~
62- wp media import <file>... [--post_id=<post_id>] [--post_name=<post_name>] [--file_name=<name>] [--title=<title>] [--caption=<caption>] [--alt=<alt_text>] [--desc=<description>] [--skip-copy] [--preserve-filetime] [--featured_image] [--porcelain[=<field>]]
62+ wp media import <file>... [--post_id=<post_id>] [--post_name=<post_name>] [--file_name=<name>] [--title=<title>] [--caption=<caption>] [--alt=<alt_text>] [--desc=<description>] [--skip-copy] [--destination-dir=<destination-dir>] [-- preserve-filetime] [--featured_image] [--porcelain[=<field>]]
6363~~~
6464
6565** OPTIONS**
@@ -92,7 +92,13 @@ wp media import <file>... [--post_id=<post_id>] [--post_name=<post_name>] [--fil
9292
9393 [--skip-copy]
9494 If set, media files (local only) are imported to the library but not moved on disk.
95- File names will not be run through wp_unique_filename() with this set.
95+ File names will not be run through wp_unique_filename() with this set. When used, files
96+ will remain at their current location and will not be copied into any destination directory.
97+
98+ [--destination-dir=<destination-dir>]
99+ Path to the destination directory for uploaded imported files.
100+ Can be absolute or relative to ABSPATH. Ignored when used together with --skip-copy, as
101+ files are not moved on disk in that case.
96102
97103 [--preserve-filetime]
98104 Use the file modified time as the post published & modified dates.
You can’t perform that action at this time.
0 commit comments