-
-
Save aaronsummers/f69a62b1eaa3f07383365e863fb4e438 to your computer and use it in GitHub Desktop.
Bulk update ALL WordPress post statuses in SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change post_type value if targeting 'page' or a custom post type | |
# Change ALL posts status from 'publish' to 'draft' | |
UPDATE wp_posts SET post_status = 'publish' WHERE (post_type = 'post' and post_status = 'draft') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment