If you have access to phpMyAdmin you can run this SQL query directly:
UPDATE {prefix}posts SET post_status="draft" WHERE post_status="publish"
If you do not have any experience with SQL queries then you should use this solution. Just place this code in functions.php
and refresh the WordPress once, and it will be done.
function setPostsToDraft()
{
global $wpdb;
$qry = 'UPDATE '.$wpdb->prefix.'posts SET post_status="draft" WHERE post_status="publish"';
$wpdb->query($qry);
}
setPostsToDraft();
Related Posts:
- Bulk Image Uploader to create new post from each image [closed]
- Manually set global $post vars with an ID, in order to use template tags
- Show a different number of posts per page depending on context (e.g., homepage, search, archive)
- How to prevent a post from being deleted?
- How can I make it so the Add New Post page has Visibility set to Private by default?
- How to moderate posts
- Limit access to posts/pages by user roles
- Show Similar Post Titles ( Similar to Stack Exchange )
- How to add option box in “Edit Post” plugin API?
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- How do I unlock a post programmatically?
- How to work with Syntax Highlighter Evolved?
- User-Specific Timezones? Hack? Plugin?
- Delete Post With No Traffic?
- How to Add jQuery Infinite Scroll to My Custom Archive Page
- Automatically Creating Posts for Popular Forum Topics or Products [closed]
- Let readers suggest edits from the frontend
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- jQuery plugin only in one page/post
- Disallow a user to post in certain categories
- How To Ignore a Filter On Applying Filter the Content In a Function
- Auto-post to multiple sites like Posterous? [closed]
- Article source link for posts
- publish_post hook isn’t working for scheduled posts
- How to get posts by content?
- Share buttons on article footer
- How to create a Page alias in WordPress
- Plugin for changing a post’s category based on it’s post date?
- Publish Post After Click On A Link
- WP get_permalink Return Wrong URL
- How to extract images of post and pages excluding header and logo image in wordpress?
- Dynamic HTML not displaying at respective place
- Fastest way to loop through all posts?
- Get the last post ID
- Enable comments for post with comments meta box removed
- Edit/revise option for authors to suggest improvement to posts [closed]
- Is there a plugin to display certain posts on certain pages? [closed]
- Custom Post Type causes Page Not Found
- Is there an equivalent to Drupal’s Batch API in WordPress?
- Unique post-id for WordPress Multisite Network
- Is there an action that is called when a post is restored from the trash?
- How to upload thousands of images?
- plugin for wp_list_categories with posts
- How to filter content post only on save
- post expire after x days
- Action on post publish
- Replace existing pages with new pages, keep menu links
- Adding “ ” before the last word in multiple defined areas with a plugin
- [Plugin: Posts 2 Posts] How does it work?
- Set attached to state
- Use plugin or custom post type for game score functionality
- Tag link suggestion plugin
- How to add new tabs in post.php
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Collaborative post submission [closed]
- CKEditor: Uncaught TypeError: switchEditors.switchto is not a functiononclick
- New post notification plugin [closed]
- Is there plugin to show recent posts from one website in the widget area of another?
- How use %like% in sql statement wordpress
- Display comments of users on single page
- Get the url of the full sized attachment image using post ID?
- Adding Plugin-specific Fields with wp_insert_post()?
- Adding Attachment Display Settings in custom media frame
- Output HTML only on individual post view
- Using the “Latest posts” feature on a different site
- Post query – show posts from specified day and month and whole years
- Is there a way to order posts and custom post types as one group?
- Execute a plugin only on post pages
- How can i list random post from multiple category?
- Support for simultaneous editing
- How to get 1 or 2 specific posts on top of my wordpress blog?
- Portfolio + Blog: multisite or plugin?
- Duplicate posts when posting nulls in records in phpMyAdmin [closed]
- Is there a way I can find wordpress posts that don’t contain a word?
- Accessing post’s meta data based on user’s click of a post
- View Private Published Page with URL Code (no login required)
- With W3 Total Cache when I publish a post it does not appear in the homepage. Only if i purge all cache [closed]
- The problem with WordPress Importer
- Cron job not firing
- Solutions to repost categories into multisite blogs?
- How to enable qTranslate languages tabs in custom plugin page
- How do I “get the next 10 posts after post_id == x”?
- Hiding posts – WP Hide Post not working
- submit posts by unregistered users in wordpress
- Calendar Solution: Handling upcoming Dates with Posts?
- get_post_type on post.php
- Is there an easy way to flag posts in the admin area?
- finding whether request is for post, and post id
- Any built-in function to associate a post to category through a plugin?
- How to hide some section in WordPress under Post
- Display post lists in 2nd paragraph
- Can’t delete Draft Post [closed]
- Matching Chapters to a Custom posts [closed]
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- My Blog page ( posts page ) theme isn’t changing with the new theme [closed]
- Can i have limit posts on a specific category and automatically remove older ones?
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- How to customized post slider layout in elementor wordpress [closed]
- Redirect a specific User role not admins automatically to view the post that they just updated
- How to export post tags from wordpress