HomeWordpress

WordPress Problem with Scheduled Post Solved

Like Tweet Pin it Share Share Email
5 (100%) 1 vote

Since WordPress 2.5, I could never get posts to publish articles at a scheduled timeframe. For whatever reason, all posts would just miss the schedule and not show up on the blog. For a few months, I had to manually change the time to get the posts to show up (or just write posts and immediately schedule them to go out).Wordpress Problem with Scheduled Post Solved

I’m happy to say that after months of research and frustration, I finally found the solution to the WordPress scheduled post problem!

Here’s a brief explanation of the issue I was having:

  • When it came time to publish the scheduled posts in WP, the post wouldn’t publish and time would start counting backwards (for example, if it’s 2 minutes past the published time, it will say “2 minutes to post”
  • Researching it seems to indicate that it was related to wp-cron.php

Solution to the Scheduled Post Issue

The way WP handles scheduling is that whenever a page is loaded (either from your blog or in your control panel), the file wp-cron.php is loaded.  So, in order to troubleshoot the scheduling issue, log in to your server’s temrinal (via SSH or others) and type

wget http://yourdomain.com/wp-cron.php

Obviously, you need to replace yourdomain.com with your own domain (in fact, you need to use the actual URL of where your wp-cron.php is located).  For example, if your blog is within a sub directory called “blog”, it will be at yourdomain.com/blog/wp-cron.php.

If everything is normal, you should see an “OK” message buried under a bunch of other junk.  If you get a 404 error or others, then that’s the first problem you should solve.

The most common problem for many server configuration is the 404 error, so here is a quick way to get this fixed.

  1. Open your /etc/hosts file (this is a text file so use a text editor to open it)
  2. Look within the file to see if your domain is pointing to a different IP than it should be (mine was pointing to 127.0.0.1)
  3. Change the wrong IP in the etc/hosts file to your domain’s public IP address
  4. type the wget code again to see if you get an OK.  If it does, you should be able to schedule your posts from now on!

If you get a write permission error, then you need to make sure wp-cron.php is writtable.

This solution only works if you have terminal access to your server.  If you are using a shared hosting where many of the steps isn’t possible, use this information to talk to your host about the scheduling problem.  They should be able to fix it for you based on this article!

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.