I have about 2000 titles. How can I automatically delete posts with these titles?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
You probably want to do something like that from the command line. Or in the database itself. Automatically delete might not be possible unless you can figure out how to run this as a cron job. Best practice would be to not publish them in the first place.
You can set the screen option in Posts to show 200-500 results and select all and delete also. Ten times or so is a lot easier than learning the command line or SQL. Less risk of crashing or breaking other stuff.
Like keepkalm said I'd find the list of post IDs from the database:
select id, post_title FROM wp_posts where post_title like '%Pharmaton%' or post_title like '%Winston Blu%' or post_title like '%Kefir%' or post_title like '%Tetradox%' or post_title like '%Passport Sco%';
and then use the list of IDs with wp-cli's
wp post delete which accepts a space-separated list of post IDs:
wp post delete 1 2 3 4
(You could also use wp post list to get all titles and IDs in the system, and grep to filter the list down to the posts you want, awk or similar to extract the list of IDs and then pass that all to wp post delete in one go - but this feels safer to do as a semi-manual process since you're deleting things.)