{"id":1793,"date":"2024-12-26T12:34:43","date_gmt":"2024-12-26T11:34:43","guid":{"rendered":"https:\/\/wpmastertoolkit.com\/module\/publication-automatique-des-publications-programmees-manquees\/"},"modified":"2025-01-01T11:01:01","modified_gmt":"2025-01-01T10:01:01","slug":"publication-automatique-des-publications-programmees-manquees","status":"publish","type":"module","link":"https:\/\/wpmastertoolkit.com\/en\/module\/automatic-publication-of-missed-scheduled-publications\/","title":{"rendered":"Automatic publication of \"missed\" scheduled publications"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Automatically publish missed scheduled items with WPMasterToolKit<\/h1>\n\n\n\n<p>The module <strong>Publish Missed Schedule Posts<\/strong> has been developed to solve a common problem encountered by WordPress administrators: scheduled posts that don't publish as planned. This problem, known as \"Missed Schedule\", can occur for a variety of reasons, such as WordPress cron interruptions or server limitations. With this module, WPMasterToolKit automates the publication of these articles with ease, requiring no manual intervention.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which plugin can this module replace?<\/h2>\n\n\n\n<p>This module can easily replace popular plugins such as <strong>Missed Scheduled Posts Publisher by WPBeginner<\/strong> or other similar solutions. The difference? This lightweight module is integrated into WPMasterToolKit, and only loads if you activate it, helping to maintain optimum performance for your site.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why is this module important?<\/h2>\n\n\n\n<p>When you schedule articles for future publication, you expect WordPress to adhere to this flawless schedule. However, due to the nature of WordPress' cron system (based on site traffic), some articles may miss their schedule. This can impact your content planning, marketing strategy and SEO. This module automatically solves this problem by detecting unpublished articles and publishing them immediately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How do I use the \"Publish Missed Schedule Posts\" module?<\/h2>\n\n\n\n<p>Using this module is incredibly simple. Here's how it works:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install and activate the plugin <strong>WPMasterToolKit<\/strong> on your WordPress site.<\/li>\n\n\n\n<li>Activate the <strong>Publish Missed Schedule Posts<\/strong> from the WPMasterToolKit administration interface.<\/li>\n\n\n\n<li>The module automatically runs and checks scheduled items each time the home page, an item or the administrator dashboard is visited.<\/li>\n<\/ol>\n\n\n\n<p>No additional configuration is required. Once activated, the module runs in the background to ensure that all scheduled articles are published on time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The technical details behind the module<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Missed item detection<\/h3>\n\n\n\n<p>The module uses an SQL query via <code data-no-auto-translation=\"\">$wpdb<\/code> to identify all items that :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Have publication status <code data-no-auto-translation=\"\">future<\/code> (scheduled for a later date),<\/li>\n\n\n\n<li>Have a scheduled publication date lower than the current date in GMT (<code data-no-auto-translation=\"\">post_date_gmt<\/code>).<\/li>\n<\/ul>\n\n\n\n<p>The module also supports custom content types using the <strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/post_types<\/code><\/strong>which dynamically modifies the content types checked by the system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using transients to optimize performance<\/h3>\n\n\n\n<p>To avoid unnecessary SQL queries, the module uses a <strong>WordPress transients<\/strong>. A list of missed scheduled items is cached for a configurable duration (default 30 minutes). This duration can be adjusted using the <strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/transient_expiration<\/code><\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Automatic publishing<\/h3>\n\n\n\n<p>Once missed items have been detected, the module uses the native function <strong><code data-no-auto-translation=\"\">wp_publish_post()<\/code><\/strong> to publish them immediately. This guarantees perfect compatibility with the native WordPress system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Examples of filter use<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Modify supported content types<\/strong><\/h3>\n\n\n\n<p>If you have specific custom content types (CPT) that you wish to include or exclude from the verification, you can use the filter <strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/post_types<\/code><\/strong>. For example, to add only the custom content type <code data-no-auto-translation=\"\">event<\/code>here's how:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">add_filter( 'wpmastertoolkit\/publish_missed_schedule_posts\/post_types', function( $post_types ) {\n    return \"'post','page','event'\"; \/\/ Ajoute le CPT \"event\" tout en conservant les articles et pages\n});\n<\/code><\/pre>\n\n\n\n<p>Or, to exclude all custom types and check only articles and pages :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">add_filter( 'wpmastertoolkit\/publish_missed_schedule_posts\/post_types', function( $post_types ) {\n    return \"'post','page'\"; \/\/ Exclut tous les autres types de contenu\n});\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Customize transient cache duration<\/strong><\/h3>\n\n\n\n<p>By default, the list of missed items is cached for 30 minutes. If you wish to adjust this duration, for example to reduce the interval to 10 minutes, you can use the filter <strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/transient_expiration<\/code><\/strong> :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">add_filter( 'wpmastertoolkit\/publish_missed_schedule_posts\/transient_expiration', function( $expiration ) {\n    return 10 * MINUTE_IN_SECONDS; \/\/ Change la dur\u00e9e du cache \u00e0 10 minutes\n});\n<\/code><\/pre>\n\n\n\n<p>Or, to extend the cache time to one hour:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\" data-no-auto-translation=\"\">add_filter( 'wpmastertoolkit\/publish_missed_schedule_posts\/transient_expiration', function( $expiration ) {\n    return HOUR_IN_SECONDS; \/\/ D\u00e9finit la dur\u00e9e du cache \u00e0 1 heure\n});\n<\/code><\/pre>\n\n\n\n<p>These filters allow you to customize the module's behavior to your specific needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why did we make these technical choices?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Performance first<\/strong> The module only loads its resources when activated, and uses a temporary cache system (transients) to reduce the impact on server performance.<\/li>\n\n\n\n<li><strong>Flexibility<\/strong> Developers can extend functionality via two filters:\n<ul class=\"wp-block-list\">\n<li><strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/post_types<\/code><\/strong> to personalize targeted content types,<\/li>\n\n\n\n<li><strong><code data-no-auto-translation=\"\">wpmastertoolkit\/publish_missed_schedule_posts\/transient_expiration<\/code><\/strong> to adjust the cache duration.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Simplicity<\/strong> The module operates automatically, without complex configuration, and concentrates solely on its main task.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>With the <strong>Publish Missed Schedule Posts<\/strong>With WPMasterToolKit, you no longer have to worry about planned articles not being published. This feature guarantees the continuity of your content strategy, while offering optimum performance thanks to its lightweight, modular integration into WPMasterToolKit. What's more, thanks to the available filters, you can tailor the module's behavior to your specific needs.<\/p>","protected":false},"excerpt":{"rendered":"<p>WPMasterToolKit's \"Publish Missed Schedule Posts\" module is designed to automatically manage missed posts on WordPress. By using native functionality and temporarily storing information, this module ensures that scheduled content is published even in the event of initial failure, with no additional burden on the administrator. Activate it to maintain the regularity of your publications and encourage user engagement.<\/p>","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":true,"_seopress_robots_primary_cat":"","_seopress_titles_title":"Publiez sans souci avec WPMasterToolKit: adieu aux d\u00e9lais!","_seopress_titles_desc":"Automatisez la publication des articles WordPress planifi\u00e9s manqu\u00e9s avec le module l\u00e9ger de WPMasterToolKit. Optimisez vos performances et votre SEO !","_seopress_robots_index":"","_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true},"class_list":["post-1793","module","type-module","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module\/1793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module"}],"about":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/types\/module"}],"wp:attachment":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/media?parent=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}