Думаю, лучшее решение - использовать XML-RPC WordPress с этим клиентом PHP:
https://github.com/letrunghieu/wordpress-xmlrpc-client
Вот код для добавления новой записи блога Wordpress и получения URL:
require_once 'WordpressClient.php';
require_once('.\Exception\NetworkException.php');
require_once('.\Exception\XmlrpcException.php');
$endpoint = "http://www.example.com/xmlrpc.php";
$wpUser = 'username';
$wpPass = 'password';
$YourCategoryID = 5;
$wpClient = new \HieuLe\WordpressXmlrpcClient\WordpressClient();
$wpClient->setCredentials($endpoint, $wpUser, $wpPass);
$title="Your Blog Post Title";
$title = htmlentities( $title, ENT_NOQUOTES, 'UTF-8' );
$body='Your HTML coded article';
$content = array(
'post_category' => array( $YourCategoryID ), // my category id
'post_type' => 'post',
'post_status' => 'published',
'post_title' => $title,
'post_content' => $body,
'ping_status' => 'closed',
'comment_status' => 'closed',
);
$result=$wpClient->newPost($title,$body,$content);
$postname=$wpClient->getPost($result);
$new_post_url_slug=$postname['post_name'];