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]
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Disallow a user to post in certain categories
- Article source link for posts
- Get the last post ID
- 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?
- How to change ID of an attachment in wp_posts and its related tables correctly?
- CKEditor: Uncaught TypeError: switchEditors.switchto is not a functiononclick
- Output HTML only on individual post view
- Execute a plugin only on post pages
- Portfolio + Blog: multisite or plugin?
- Cron job not firing
- How to enable qTranslate languages tabs in custom plugin page
- How do I “get the next 10 posts after post_id == x”?
- Calendar Solution: Handling upcoming Dates with Posts?
- get_post_type on post.php
- How to hide some section in WordPress under Post
- 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]
- Outbound link autometic converted into linkdirect , and not opening
- Display by Category in Admin
- posts comments goes to trash
- Contributive page where people logged in can write
- Plugin: register_deactivation_hook works perfectly well, while register_activation_hook suddenly stopped working
- Redirect to another page using contact form 7? [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Is it possible to send blog posts via email to subscribers?
- Custom setup of wordpress comments that are displayed
- Is there any plugin which can paste a common content to my every post?
- How do i edit the plugin files in DataBase via phpMyAdmin?
- Recent posts per category loop?
- Import Instagram post to WordPress blog post
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- How to get all posts belongs to a user between a certain date
- Making my plugin create a page?
- How to change the post form from plugin?
- Allowing users to Sign-up > Login > Post articles that need approval
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- download button for audio file in post [closed]
- check uncategorized category by default
- Print posts category or tag as a formatted journal
- Way to send multiple values for column to MySQL?
- Article content navigator in wordpress like mbaskool website
- Getting a list of the published posts
- If post exists in the database – each time goes on `else`
- What hook can I use to modify custom post data before it is displayed on the page?
- get current page number with wp_link_pages()
- problem with register_activation_hook in plugin
- How can i summerize posts or news automatically in word press site?
- Delete data from custom table when deleting a post
- Plugin is creating posts twice
- Edit part of a post
- How to write a new file when new post has been published in WordPress
- Displaying number of drafts in Posts section of admin sidebar [closed]
- WordPress Stats Plugin: Display Post Views [closed]
- Is the bulk_action hook stable for use in 3.2.X?
- How to Get Recent 5 post in My Title bar?
- Plugin for visitors to edit content without logging in? [closed]
- WP Insert Post If user refreshes override new post
- Summary and Comments on Main landing Page
- Method/Plugin/Hack to Start a Post with an Writing Outline?
- What snippet do I need to type to show my ACF field show up on my theme?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Oops! That page can’t be found
- Help to Create a Simple Plugin to make a post
- WordPress is redirecting me to homepage
- Adding custom post category to categories widget
- How can I see $post object in frontend from functions.php?
- Allow members to create groups on my site
- How to wrap image tag into div for post only?
- My own metabox checkbox plugin only saves the last value I’ve checked
- How to prevent authors from editing their post count?
- Is there any hook to change media html in post? [duplicate]
- How to force regenerate thumbnails in WordPress posts?
- Publish Post but don’t call publish hook in foreground post creation
- Serialize $_POST global in wordpress
- How to use shortcode of any plugin to show it visually where i want?
- WordPress not updating post or disable plugin instead a white page appear
- get post excerpt by query
- Ger posts from similar tags and categories
- Internationalization of Blog Posts
- Issues with Post 2 Post Plugin
- How to add character to content of post?
- single.php fires more than once after clicking on any post to view with different post id each time
- Twitter List Tweets and Delicious Links as Posts
- Custom feed parameters / Template overriding
- How to make only selected posts appear on a selected wordpress page
- How to block external download link access if visitor not referred from WP?
- Plugin to display text before a post
- Notifications Bar on home page only
- Distribute post content through several divs [closed]
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]
- How to get an error message if a form is empty (plugin: Post for site) [closed]
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- How to update a lot of posts on my WP site with additional content?