Nope, 很遗憾,不是。。。我或多或少都在寻找同样的东西(按ID而不是日期排列),而且从那以后wp media regenerate
supports entering an ID range 我想这应该是可能的。。。
# Re-generate all thumbnails that have IDs between 1000 and 2000.
$ seq 1000 2000 | xargs wp media regenerate
Found 4 images to regenerate.
1/4 Regenerated thumbnails for "Vertical Featured Image" (ID 1027).
2/4 Regenerated thumbnails for "Horizontal Featured Image" (ID 1022).
3/4 Regenerated thumbnails for "Unicorn Wallpaper" (ID 1045).
4/4 Regenerated thumbnails for "I Am Worth Loving Wallpaper" (ID 1023).
Success: Regenerated 4 of 4 images.
你可以
export your posts by date range first 通过
wp export --dir=/tmp/ --user=admin --post_type=post --start_date=1970-01-01 --end_date=2070-12-31
然后打开生成的XML文件,选择all
<wp:post_id>XYZ</wp:post_id>
在编辑器中(如SubliveText或VSCode),去掉标记并将ID格式化为空格分隔的列表,然后使用收集的ID进行批量删除,如下所示
wp post delete 1001 1009 1028 1030 1044 1050
很麻烦,我知道。。。大概
create an issue 在相应的Github repo上请求此功能?