For development purpose I need to constantly fill and unfill a WordPress instance with dummy content. Deleting everything in two steps is quite annoying, so I’m wondering if there’s a way to cut the long way around to trash when deleting posts. Please help.
3 Answers
Considering this site is WordPress Development, I’m assuming you would like to know how to (force) delete posts programmatically.
wp_delete_post(257, true); // `true` indicated you would like to force delete (skip trash)
More on wp_delete_post()
function