$_POST[‘message’] gives a 404 [duplicate]

To insert a post into the WordPress database, whether you are doing it as a logged in user to the current WordPress installation or over XML-RPC (or any other remote methodology) you need to be using something along the lines of;

  $the_post = array(
     'post_title' => 'Post Title',
     'post_content' => 'My post content',
     'post_status' => 'publish',
     'post_author' => 1,
  );


  wp_insert_post( $the_post );

In the case of using a form or some other programmatic means to insert a post, your code might look like this;

  $the_post = array(
     'post_title' => 'Post Title',
     'post_content' => $_POST['message'],
     'post_status' => 'publish',
     'post_author' => 1,
  );


  wp_insert_post( $the_post );

The bottom line is this, no matter how you decide to insert a post – be it via sending an SMS, using a remote form, smoke signal or the like – your code that handles and processes the data to be inserted must reflect the above examples (in its most simplistic form).

So, what does your code look like that is handling the processing of your incoming SMS message?


References:

wp_insert_postWordPress Codex