Quickly Find Password Protected Posts WordPress

Recently I needed to view all posts that were password-protected. Not finding a WordPress function for this, I wrote a quick SQL command to find all password-protected posts in the WordPress database.

SELECT * FROM `wp_posts` WHERE `post_password` != ''

As written, this command will select all password-protected posts from the wp_posts table. Don’t forget to change the wp_ prefix if your WordPress tables are using something other than the default value.

See also  Remove “Cart” from breadcrumbs WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *