Create post with REST API in php with file_get_contents

You’ll need to install a plugin to add authentication, by default it requires a cookie and a nonce token, but for CLI apps or PHP requests, you’ll want to install a basic auth plugin or use OAuth1/2

File not found.