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.)
Related Posts:
- When tax_query used, results disappear (0 =1 produced)
- WP_Query in functions.php
- mysql custom wp query
- How to get last updated row or ID in wordpress
- Removing the first image in content
- Gravity Forms field entries into wp_query loop [closed]
- Is it good practice to use wpdb->query() function?
- list tags with count in author profile page
- wp_is_mobile dequeue not working
- Having a Function Inside of the Loop
- Wp_query function to search from product_title ‘OR’ product tags name
- Dynamic dropdown from database table
- Display tags that only appear in one category
- Custom Query Not Paginating
- Reset postdata not working on WP_Query in functions.php
- Wp-query Order By problem
- How is $current_page passed in woocommerce_account_orders function?
- wp_usermeta – Read from database, but save function broken
- How to apply the ‘current_page_item’ class to an archive page in `wp_list_pages()`?
- Filter for replacing the WP_query object for a given category
- How to avoid saving empty data to sql while using add_meta_box
- Create a CUstom Archive by Year, but just for a Single Category
- Updating custom query var with multiple values
- WP_Query for Attachments not working as expected
- query_vars treat as single var from URL
- Writing a function for WP Cron to run a SQL command daily
- Delete oldest wordpress post (SQL query)
- How can I display a query in a page?
- Function returning queried meta value based on current post ID
- Optimizing multiple WP_querys into one call?
- Query is not work
- Integrating custom API for post content into Admin interface & Public Website [closed]
- Automatically delete posts that aren’t in an array
- Insert image between X number of posts but on specific paginated pages?
- How do I get the current edit page ID in the admin?
- ajax category filter
- Apply custom role capabilities to administrator (without plugin)
- In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]
- Linking thumbnail to full size image
- is_front_page not working in functions.php
- VERY new to coding – keep breaking site trying to add to functions.php
- How to enqueue JavaScript for specific WordPress pages only?
- Functions.php reverted to new one
- Exclude Empty Child Categories in Menu
- Get page slug and assign a variable within functions.php
- Custom roles can’t access to wp-admin
- How to specify which Gutenberg blocks are available in the editor for a page template
- How to insert a text in all pages and posts before or after specific places?
- Add class or ID to any WordPress function
- How to filter out shortcode when displaying the_excerpt() in the loop?
- Change Admin Bar “Visit Site” URL
- exclude a category from a search on a specific page
- How do I pass arguments for multiple functions hooked to a single action?
- Last updated date function
- Possible to display shortcode based on the category?
- How to set default archive image without overriding first attached image? [closed]
- WSoD being caused by this piece of code
- Toggle User Roles with button
- Passing a variable via wp_head and then calling it on the page
- How to make custom column Admin>Users sortable?
- Theme functions.php file auto delete everyday [closed]
- How to know which ajax file or function is called for action
- How to filter $content in shortcode function
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Generating dynamic css into custom file [closed]
- Difficulty with PHP function that displays a post’s format in WordPress
- List authors with the last post title and order by last post date
- Function coding error concatenating quotes I think
- Need print logo without any ID & class
- Can we create our own theme’s function.php?
- Filter nav menu items HTML tags and wrap inner text with span
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Using Static HTML instead of the `home_url()` WP function
- How to append classname to body tag if guest user
- Parent theme styles overriding child theme CSS [closed]
- Can I include a custom PHP function in a WordPress function?
- Function to replace comment’s accented characters before posting
- wp_nav_menu work in functions.php but not in the theme
- Only echo Page Content (not page title & page content together)
- How do I preserve changes to a theme’s functions.php across updates?
- Unable to Change “Pages:” Before WP_LINK_PAGES
- Multiple, Dynamic, Sidebars Problem – First Sidebar not working properly
- Looking for Functions File that doesn’t Exist
- Fetch URL parameter
- Redirect to one of two pages after data submitted, depending on the current url
- adding dynamic/multiple slug values in ‘option_none_value’
- Problem with my footer after changing WooCommerce Products Sorting [closed]
- Limiting WordPress Search function : Custom build
- Why does my wp_enqueue_script() only insert the script for logged in users
- method to fetch entire tag list on archive.php
- MCAPI.class.php showing some error
- Custom taxonomy check box now showing up
- Set display name from nickname with register process
- Limit Number of Posts on Blog Category Page Throwing 404 Error on Paginated Pages
- How can I return the result of my custom function?
- Multisite Admin Roles
- Database SQL Error, Should Work
- How to display data from custom fields in my custom shortcode?
- What are the parameters are used in add_action and filters?
- Creating mixture of shortcodes to use in the visual/text editor