say this:
wp post delete --force $(wp post list --post_type=product --format=ids)
I found out that it's far more fast and performant than deleting posts from admin.
But I was wandering: any differences between the cli and admin ways? For example, will that cli command also delete metadata associated with deleted posts?
say this:
wp post delete --force $(wp post list --post_type=product --format=ids)
I found out that it's far more fast and performant than deleting posts from admin.
But I was wandering: any differences between the cli and admin ways? For example, will that cli command also delete metadata associated with deleted posts?
Share Improve this question edited Nov 25, 2019 at 20:18 norman.lol 3,2313 gold badges30 silver badges35 bronze badges asked Nov 25, 2019 at 15:19 Luca ReghellinLuca Reghellin 1,6422 gold badges21 silver badges45 bronze badges 1- 3 They both call the same functions internally, but one way to test this is to just do it and check if the post meta is still present – Tom J Nowell ♦ Commented Nov 25, 2019 at 15:51
1 Answer
Reset to default 4In short, yes. However, if you run into an issue like custom fields or media hanging around, you could use:
wp post meta delete
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744966872a4603735.html
评论列表(0条)