$posts = array(
'ID' => $id, //Are you updating an existing post?
'comment_status' => 'open', // 'closed' means no comments.
'post_author' => '1', //The user ID number of the author.
'post_category' => array($cat), //Add some categories.
'post_content' => $row[1], //The full text of the post.
'post_date' => date('Y-m-d H:i:s', $row[5]), //The time post was made.
'post_status' => 'publish',
'post_title' => $row[0], //The title of your post.
'post_type' => 'post' //Sometimes you want to post a page.
//'tags_input' => '<tag>, <tag>, <...>' //For tags.
);
}
foreach ($posts as $post) {
echo "processando post...<br />";
sleep(1000);
echo wp_insert_post($post);
}