Wordpress Tutorials

How to Bulk Update All Posts in Wordpress? | A Plugin Which Helps You to Bulk Update All Your Wordpress Posts !

Hi Guys, Today I am Going to tell you to How to Bulk Update All Posts in Wordpress? | A Plugin Which Helps You to Bulk Update All Your Wordpress Posts!

Check Out This: How to Fix An Automated Wordpress Update has failed to Complete – Please attempt the update again now Error?

Steps For How to Bulk Update All Posts in Wordpress? | A Plugin Which Helps You to Bulk Update All Your Wordpress Posts! 

Method 1: Using Plugins

Plugin 1: Bulk Edit Publish Date 

Step 1: First of all Goto Plugins in your Wordpress Panel and Click Add New Plugin.

Step 2: Now Search for the Plugin Bulk Edit Publish Date and Click Install and Activate it.

Step 3: Now Go to your Posts and Select all the Posts and Click the Set Publish Date Option and Again Click Apply.

How to Bulk Update All Posts in Wordpress?

If you’re unable to get the Plugins or the Plugin gets Deleted in Wordpress, Don’t Worry Guys I’ll give you my backup!

You can get the free plugins from the below link.

https://wordpress.org/plugins/bulk-edit-publish-date/

Also Read: How to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”?

Plugin 2: Bulk Post Update Date

Step 1: First of all Goto Plugins in your Wordpress Panel and Click Add New Plugin.

Step 2: Now Search for the Plugin Bulk Post Update Date and Click Install and Activate it.

Step 3: Now Go to Bulk Post Update Date Plugin and Select the Hours and Select the Categories and Click Update Post Dates.

How to Bulk Update All Posts in Wordpress?

*Important Note:  Always Go With Plugin Method Rather than Trying a Code Method.

*Very Important NoteIt is Necessary to Take a Backup before Start Editing while Using Code Methods.

Method 2: Using Following Codes

Code 1

Step 1: First of all Sign-in in to your Website Hosting Account.

Step 2: Now Access your C-panel And Open the File Manager either via Web or FTP it’s your wish.

Step 3: Now Go to Public_HTML Folder and Open the Functions.php File.

Step 4: Now Paste the Below Given Code and Save it.

function update_all_posts() {
    $args = array(
        'post_type' => 'post',
        'numberposts' => -1
    );
    $all_posts = get_posts($args);
    foreach ($all_posts as $single_post){
        $single_post->post_title = $single_post->post_title.'';
        wp_update_post( $single_post );
    }
}
add_action( 'wp_loaded', 'update_all_posts' );

 

*Important Note:  Take a Backup before Editing the Funtions.php File

Code 2

Step 1: First of all Sign-in in to your Website Hosting Account.

Step 2: Now Access your C-panel And Open the File Manager either via Web or FTP it’s your wish.

Step 3: Now Copy Paste the Below Given Code in Notepad ++ and save it as PHP File.

<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
 
if ( ! class_exists( 'MyPlugin_BulkUpdatePosts' ) ) : 
 
class MyPlugin_BulkUpdatePosts {          
 
public function __construct(){
      register_activation_hook( __FILE__, array( $this, 'do_post_bulk_update' ) );//Run this code only on activation
}          
 
//Put your code in this function
public function do_post_bulk_update(){
    $posts_to_update = get_posts('cat=x&showposts=1000');//Retrieve the posts you are targeting
    foreach ( $posts_to_update as $update_this_post ):
           $update_this_post->post_title = 'Post Prefix: '.$update_this_post->post_title;//The post field you are updating.
           wp_update_post( $update_this_post );
    endforeach;
 }
 
}
endif;

Step 4: Now Put it in a Folder and Name it as Bulk Update All Post.

Step 5: Now Put that Folder in Zip File and Upload it as a Plugin to your Website.

And Do Bulk Update Easily!

*Important Note:  Take a Backup before Editing the Funtions.php File

@@@ Leave Comments @@@

## Stay Safe Guys And Live Happily ##

Show More

Author

Basically an Instrumentation Engineer But Very much Interested in Blogging. I'm a Passionate Blogger and an Expert in Search Engine Optimization And Always Looking Forward to Learn New Things. I Would Fix & Provide Solution to the Most Common Issues Related to PC,Laptops,Mobiles,OS, Hardwares and Softwares.

Related Articles

Leave a Reply

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

Back to top button
Close

Adblock Detected

Please consider supporting us by disabling your ad blocker!