Title: Programmatic future post does not work
Last modified: August 22, 2016

---

# Programmatic future post does not work

 *  Anonymous User 11856187
 * (@anonymized-11856187)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/programmatic-future-post-does-not-work/)
 * Hi dear community!
    These days I encountered a problem. I try to create a future
   post programmatically.
 *     ```
       wp_insert_post( array(
           ...,
           'post_status' => 'future',
           'post_date' => $date, /* format [ Y-m-d H:i:s ] */
           ...
       ) );
       ```
   
 * Post is created as ‘scheduled’, but when time arrives to make post status public,
   it does not make it, and post remains scheduled.
    What can be the problem?
 * / windows(8.1) / linux(ubuntu) / xampp / localhost /
 * Thanks in advance!
    Greetings, Andrew.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Julien Klepatch](https://wordpress.org/support/users/julien-klepatch/)
 * (@julien-klepatch)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/programmatic-future-post-does-not-work/#post-5379937)
 * 1) You can schedule a post to be published at a future date in the post editor
   
   2) If you really want to do it with wp_insert_post, try to test it on a live 
   server. Your computer doesn’t run all the time, but the server does. When it’s
   time to publish your post, your computer may have been be shut down at this moment,
   and it may have interfered with the internal mechanism used by WordPress to publish
   the post.
 *  Thread Starter Anonymous User 11856187
 * (@anonymized-11856187)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/programmatic-future-post-does-not-work/#post-5379956)
 * By “doesn’t run all the time” You mean that my PC is turned off?
    For example
   I create a post +2 minutes from this time. And I go in backend and wait/refresh
   page to see some changes but nothing is happening!? Or You meant something else?
 * Thanks
 *  [Julien Klepatch](https://wordpress.org/support/users/julien-klepatch/)
 * (@julien-klepatch)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/programmatic-future-post-does-not-work/#post-5379959)
 * Yes its what I mean.
 * In any case you should really give it a try on a real live server. Results may
   be different

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Programmatic future post does not work’ is closed to new replies.

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [status](https://wordpress.org/support/topic-tag/status/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Julien Klepatch](https://wordpress.org/support/users/julien-klepatch/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/programmatic-future-post-does-not-work/#post-5379959)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
