Support » Fixing WordPress » Post-dated posts never go live.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m having this same problem. It just started when I moved my blog to new hosting. Could it be a permissions issue?

    Not seeing the problem at 2.3.1. Have you considered upgrading?

    Oh, I should have mentioned that. I am running 2.3.1, and post-dating was working before I moved to the new server setup.

    Check the “Times in the blog should differ by:” in Options->General.

    Also if it happens again, it would be interesting to know the post_date and post_date_gmt in wp_posts.

    so here’s where it gets interesting. Here’s a print_r of a post made at 8:30AM timestamped for 8:35AM and accessed at around 8:40AM

    stdClass Object
        [ID] => 1388
        [post_author] => 1
        [post_date] => 2007-11-28 08:35:28
        [post_end_date] =>
        [post_date_gmt] => 2007-11-28 16:35:28
        [post_content] => Lorem ipsum dolor sit amet...
        [post_title] => Post-dated post
        [post_category] => 0
        [post_excerpt] =>
        [post_status] => future
        [comment_status] => open
        [ping_status] => closed
        [post_password] =>
        [post_name] => post-dated-post
        [to_ping] =>
        [pinged] =>
        [post_modified] => 2007-11-28 08:35:28
        [post_modified_gmt] => 2007-11-28 16:35:28
        [post_content_filtered] =>
        [post_parent] => 0
        [guid] =>
        [menu_order] => 0
        [post_type] => post
        [post_mime_type] =>
        [comment_count] => 0
     current time:2007-11-28 8:40:07

    where it gets weirder is that when I checked the dashboard at around 8:34 it said:

    Scheduled Entries:
        * Post-dated post in 1 min

    and when I checked it again at 8:40 it said:

    Scheduled Entries:
        * Post-dated post in 5 mins

    So it actually started counting up again

    in the dump of $post you’ll notice:

    [post_status] => future
    [post_date] => 2007-11-28 08:35:28
    [post_date_gmt] => 2007-11-28 16:35:28

    even though the time (printed with date()) is
    current time:2007-11-28 8:40:07

    so, I’m stumped. The part where dashboard is counting up is actually almost comical. It’s now 8:47 and dashboard says:

    Scheduled Entries:
        * Post-dated post in 12 mins

    any ideas?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    any ideas?

    Yes. Your WP-Cron is not working on the new host. It’s a problem with the host being unable to connect back to itself, for whatever reason.

    WP-Cron works by making an fsockopen call back to itself (wp-cron.php specifically), which triggers lots of various events. Making future posts publish is one of those events.

    Since WordPress can’t trigger WP-Cron to work, the posts never publish. Also, pings and trackbacks won’t work.

    The simple solution is to figure out what’s broke on the new host. Does it not have DNS set up properly? Can it not resolve it’s own domain name? Does it not allow fsockopen? Does it have a firewall blocking connections from itself? Could be anything.

    As a temporary workaround, you can manually force WP-Cron to run. Edit the wp-cron.php file, and remove this code:

    if ( $_GET['check'] != wp_hash('187425') )

    (note, you’ll want to add it back afterwards, so keep a copy of the file).

    Next, in a browser, load your own site’s wp-cron.php manually, like so:

    That will allow wp-cron to run and take care of stuff. You may have to run it multiple times if it has a lot to do.

    In the meantime, ask your host why their webservices are broken.

    ahh thanks, this is starting to make sense. Unfortunately I’m on an unmanaged virtual dedicated server. So I guess the hard bit is up to me. Do you know if there is a way I can get some error information so I can troubleshoot this?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Mmmmm.. Not really. You could look at the apache logs, see if there’s any errors in there. I really have never been able to reproduce the problem myself. I install Apache and PHP and it “just works” when I do it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post-dated posts never go live.’ is closed to new replies.