Set WordPress all of your pages to private so that you can un-publish them

Visits: 563

Just set them to private in the database, using the following query:

UPDATE `wp_posts` SET `post_status` = 'private';

This would set all posts to private, I guess you won’t really use that query.

Instead, to only set articles to ‘private’ use:

UPDATE `wp_posts` SET `post_status` = 'private' WHERE `post_type` = 'post';

and to only disable pages, use:

UPDATE `wp_posts` SET `post_status` = 'private' WHERE `post_type` = 'page';

Post-revisions have the status ‘inherit’ and thus get the right inherited from the parent page or article.

https://stackoverflow.com/questions/16209821/can-you-make-all-wordpress-pages-private-simultaneously-without-a-plugin