wp cli - Does wp post delete also delete metadata associated with posts?

say this:wp post delete --force $(wp post list --post_type=product --format=ids)I found out that it's far more fast

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
Add a comment  | 

1 Answer 1

Reset to default 4

In 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

相关推荐

  • wp cli - Does wp post delete also delete metadata associated with posts?

    say this:wp post delete --force $(wp post list --post_type=product --format=ids)I found out that it's far more fast

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信