Differences

This shows you the differences between two versions of the page.

Link to this comparison view

litespeed_wiki:cache:lscwp:scheduledpost [2018/07/24 18:06] (current)
Eric Leu created
Line 1: Line 1:
 +===== Scheduled Posts Not Publishing On Time =====
 +Scheduled Posts are published in WordPress through a WP cron job. Normally, WordPress triggers the cron job each time a request hits the backend. The backend is rarely hit, however, when using a cache, which causes scheduled posts to publish late.
 +
 +LSCWP will correctly purge the cache when a scheduled post is published in the cron job. All you need to do is make sure that you can reliably hit the backend. This can be done by scheduling a cron job to hit wp-cron.php at your ideal interval.
 +
 +For Example, to update scheduled posts every 15 minutes:
 +<​code>​
 +*/15 * * * * wget http://​your_wp_site/​wp-cron.php
 +</​code>​
 +
 +When using a server level cron job, WordPress suggests defining DISABLE_WP_CRON in your wp-config file to disable checking wp-cron on a backend hit.
 +<​code>​
 +define('​DISABLE_WP_CRON',​ true);
 +</​code>​
 +This may be useful in reducing the number of calls made to wp-cron if that is desired.
 +
 +[[https://​blog.litespeedtech.com/​2017/​05/​17/​wpw-using-lscache-for-wp-with-scheduled-posts/​|For a more in-depth discussion of this issue, see our blog.]]
  
  • Admin
  • Last modified: 2018/07/24 18:06
  • by Eric Leu