Bulk move 130,000 post content value to a custom Filed in wordpress

Solution:

You must do that by MySQL query like this in wp function:

add_action( 'get_header', 'so19967768_update_posts' );
function so19967768_update_posts()
{
    if( ! isset( $_GET['update'] ) )
        return;

    global $wpdb;
    $wpdb->query( "INSERT INTO `wp_postmeta`(`post_id`, `meta_key`, `meta_value`) SELECT ID,'views',post_content FROM `wp_posts`;");
    $wpdb->query( "UPDATE `wp_posts` SET `post_content`='';");

    die();
}

Also, You can run this directly on wp_postmeta table in database:

INSERT INTO `wp_postmeta`(`post_id`, `meta_key`, `meta_value`) SELECT ID,'views',post_content FROM `wp_posts`;
UPDATE `wp_posts` SET `post_content`='';

*Trick: If wp function doesn’t work by load website, comment this line:

if( ! isset( $_GET['update'] ) )
        return;