Bulk Update of Custom Post Type Post Status through SQL

If you mean post type instead of slug I’d say…

UPDATE wp_posts
SET post_status="archived"
WHERE post_status <> 'static'
AND post_type="cpt_operator";

But be careful when editing the db directly!

Leave a Comment