Skip to content

Instantly share code, notes, and snippets.

@andrewahead4
andrewahead4 / rest_insert_post.php
Last active April 18, 2024 13:55
A simple post insert using WP REST API and PHP over basic authentication
<?php
///////////////////////////////////////////////////////////////////////////////////
// //
// This is using a sample local WordPress Install and is not production safe //
// It uses the REST and Basic Auth plugins //
// //
///////////////////////////////////////////////////////////////////////////////////