1

I want to delete all posts from a custom post type "TV-Serie". The number of all posts in this post type are 150,000. Moreover, when I try to delete them all manually while selecting more than 500 posts at once this provides "timeout error".

Any idea on how to delete them all?

  • It may be possible to do a raw SQL "DELETE FROM wp_posts WHERE wp_posts.post_type='TV-Serie'; ". I'm not convinced that is the best or even a recommended way to do it but it would remove the records (brutally). Seriously, use with the utmost caution; this could go very wrong with the smallest error. – Matthew Brown aka Lord Matt Aug 4 '19 at 1:47
  • My post type is episodes and while submitting the SQL querry as: DELETE FROM wp_posts WHERE wp_posts.post_type='episodes'; which provides the following error: "Error in processing request - Error code: 524 Error text: error" – Zulkifl Agha Aug 6 '19 at 8:41
  • You got me there, I cannot find that error code in Google. Try LIMIT 500? This one might be beyond me. – Matthew Brown aka Lord Matt Aug 7 '19 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.