Ma perché non utilizzare le api interne di wordpress?
E' molto più semplice secondo me, guarda qui: https://developer.wordpress.org/refe...p_insert_post/

Qulcosa di questo tipo dovrebbe bastare:

codice:
<?php
// Carica WordPress nel tuo script
require_once 'path/to/wp-load.php';


// Crea il post e inseriscilo
$id = wp_insert_post(array(
    'post_title'    => $title,
    'post_content'  => $content,
    'post_type'     => 'post',
    'post_status'   => 'publish',
));