• We have a custom website that has over 20k cpt entries. We need to remove about 4k, I need to know if it is better to “trash” inside WordPress or remove via MySQL? Thoughts, opinions? Thank you

Viewing 1 replies (of 1 total)
  • Hi @tazcrzy

    In my opinion, it’s usually best to “trash” from inside WordPress, as it should also delete any associated data (eg metadata). Additionally, if any custom plugins need to delete associated data, their delete routines would also kick in if you trash from within WordPress.

    You could consider automating this process, by gathering the custom post ids, looping through the ids, and calling wp_trash_post() on each one. This would be faster than doing in the admin UI.

    However, it is possibly faster if you delete via MySQL, you will just need to ensure that you also delete any associated data.

Viewing 1 replies (of 1 total)
  • The topic ‘CPT delete from WordPress or MySql’ is closed to new replies.