{"id":10382,"date":"2019-11-14T15:54:05","date_gmt":"2019-11-14T14:54:05","guid":{"rendered":"https:\/\/wp-akuten.se\/development-wordpress\/why-do-my-scheduled-posts-not-appear\/"},"modified":"2024-12-04T16:26:10","modified_gmt":"2024-12-04T15:26:10","slug":"why-do-my-scheduled-posts-not-appear","status":"publish","type":"post","link":"https:\/\/wp-akuten.se\/en\/tips-wp\/why-do-my-scheduled-posts-not-appear\/","title":{"rendered":"Why do my scheduled posts not appear?"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-1024x683.jpg\" alt=\"line break\" class=\"wp-image-10145\" srcset=\"https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-300x200.jpg 300w, https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-768x512.jpg 768w, https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-1024x683.jpg 1024w, https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-1536x1024.jpg 1536w, https:\/\/wp-akuten.se\/wp-content\/uploads\/2024\/04\/skrivmaskin-radbrytning-2048x1365.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Sometimes posts are not published in the time you have set in WP.<\/strong><\/p>\n\n\n\n<p>You set the day and time and yet your post was not published.<\/p>\n\n\n\n<p>Even if you think it&#8217;s a bug, it&#8217;s not, it could be because that&#8217;s how WordPress works.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">WP Cron and how it works<\/h2>\n\n\n\n<p>The function to publish a scheduled post is started by a part in WordPress called WP-CRON. For the feature to kick in, something needs to happen on the website. And therein lies the problem! <\/p>\n\n\n\n<p>Your website visitor triggers WP-CRON and then the function runs, so if there are no visitors to your website, wp-cron will not run and no post will be published. So the problem arises on pages with little traffic. <br><br>WP-cron also hates other things on your site and starts automatic updates, for example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use a custom cron job instead<\/h2>\n\n\n\n<p>The best and easiest solution is to run a regular cron job through your web host instead. Then you won&#8217;t be dependent on visitors and things will work the way you thought they would. <\/p>\n\n\n\n<p>In the web host, you set a cron job to https:\/\/dindoman.se\/wp-cron.php that runs every 5 minutes. <\/p>\n\n\n\n<p>You should also add the following line to your wp-config.php to tell wordpress that you are managing cron alongside WordPress<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">define('DISABLE_WP_CRON', true);<\/pre>\n\n\n\n<p>Here you can read more about <a href=\"https:\/\/developer.wordpress.org\/plugins\/cron\/\">WP-cron<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-wordpress-developer-resources wp-block-embed-wordpress-developer-resources\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"2losmH1Ik9\"><a href=\"https:\/\/developer.wordpress.org\/plugins\/cron\/\">Cron<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Cron&#8221; &#8212; WordPress Developer Resources\" src=\"https:\/\/developer.wordpress.org\/plugins\/cron\/embed\/#?secret=eiVP6ZyC4p#?secret=2losmH1Ik9\" data-secret=\"2losmH1Ik9\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes posts are not published in the time you have set in WP. You set the day and time and yet your post was not published. Even if you think it&#8217;s a bug, it&#8217;s not, it could be because that&#8217;s how WordPress works. WP Cron and how it works The function to publish a scheduled &hellip;<\/p>\n","protected":false},"author":2,"featured_media":9962,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[112,123],"tags":[],"class_list":{"2":"type-post","7":"category-tips-wp","8":"category-troubleshooting","9":"entry"},"taxonomy_info":{"category":[{"value":112,"label":"Tips"},{"value":123,"label":"Troubleshooting"}]},"featured_image_src_large":["https:\/\/wp-akuten.se\/wp-content\/uploads\/2016\/04\/funktion.jpg",460,300,false],"author_info":{"display_name":"Karin H Olsson","author_link":"https:\/\/wp-akuten.se\/en\/author\/adaro3r\/"},"comment_info":0,"category_info":[{"term_id":112,"name":"Tips","slug":"tips-wp","term_group":0,"term_taxonomy_id":112,"taxonomy":"category","description":"","parent":0,"count":25,"filter":"raw","meta":[],"cat_ID":112,"category_count":25,"category_description":"","cat_name":"Tips","category_nicename":"tips-wp","category_parent":0},{"term_id":123,"name":"Troubleshooting","slug":"troubleshooting","term_group":0,"term_taxonomy_id":123,"taxonomy":"category","description":"","parent":0,"count":6,"filter":"raw","meta":[],"cat_ID":123,"category_count":6,"category_description":"","cat_name":"Troubleshooting","category_nicename":"troubleshooting","category_parent":0}],"tag_info":false,"acf":[],"_links":{"self":[{"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/posts\/10382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/comments?post=10382"}],"version-history":[{"count":7,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/posts\/10382\/revisions"}],"predecessor-version":[{"id":10799,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/posts\/10382\/revisions\/10799"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/media\/9962"}],"wp:attachment":[{"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/media?parent=10382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/categories?post=10382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp-akuten.se\/en\/wp-json\/wp\/v2\/tags?post=10382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}