Publish page remotely
Pat is correct the REST API is the best way to add a new post/page to your site. Here is a more complete guide with an example: https://rudrastyh.com/wordpress/rest-api-create-delete-posts.html#create_post Example code for publishing a new post: $api_response = wp_remote_post( ‘https://WEBSITE/wp-json/wp/v2/posts’, array( ‘headers’ => array( ‘Authorization’ => ‘Basic ‘ . base64_encode( ‘LOGIN:PASSWORD’ ) ), ‘body’ => array( … Read more