Fixing scheduling error preventing post from publishing on WordPress.

phan tu cua wordpress 1

At AZDIGI, some customers are facing issues with scheduling posts in WordPress. The main reasons for this problem include discrepancies between website and system time zones, malfunctioning Cron Jobs in WordPress, and customization of time zones on VPS. To resolve this, users should check and adjust the system time zone to match the website time zone. Additionally, if Cron Jobs are blocked, users can install the Scheduled Post Trigger plugin to automatically reschedule missed tasks. By following these steps, users can effectively address the issue of posts not being published on schedule in WordPress.

Introduction

In my experience assisting customers at AZDIGI, some clients encounter issues with scheduling posts that don’t get published at the designated time. This problem usually stems from the following reasons:

  1. Website time and system time (Host/VPS) not matching.
  2. WordPress Cron Jobs not functioning properly.

This issue is prevalent in about 80% of cases, particularly on VPS platforms, where users can customize timezones based on their geographic location. If the website time and system time don’t align, scheduled posts may publish at the wrong time or not publish at all.

Below is an illustration of the scenario where the website time (18:47) and system time (11:47) differ, leading to posts not being published as scheduled. If you’re using Hosting and need to check the system time, you can simply go to Host >> Terminal and type date to view the system time. If it’s incorrect, contact your Hosting provider to address it.

Handling Process

Now, I’ll walk you through steps to identify and resolve the issue:

See also  Including related content in a simple article to enhance reader engagement.

Scenario 1: Check and Adjust Timezones

Step 1: Check System Time and Website Time

As seen in the previous case, when the VPS and website timezones differ, the first step is to synchronize them. Let’s say I’m in Vietnam, and I choose the Ho Chi Minh timezone, where the time is currently 18:50. However, on the VPS, it’s 11:50, indicating a 7-hour delay.

Step 2: Update System Time

On your VPS, you can use the following commands to check and update the time zone to Vietnam:

timedatectl status             ### View timezone information
timedatectl set-timezone "Asia/Ho_Chi_Minh"   ### Set Vietnamese timezone for VPS

After resolving this, check if the scheduled post on the website now works correctly. In my case, after updating the time zone, the scheduled posts were published successfully.

Scenario 2: Verify WordPress Cron Jobs

Step 1: Check for Cron Jobs Blockage

If the timezone is correct but the issue persists, check if your WordPress Cron Jobs are blocked. If this feature is blocked, related auto-run settings won’t function. Open the wp-config.php file in the Document Root to find and remove the line disabling Cron Jobs.

define('DISABLE_WP_CRON', 'true');

If this doesn’t resolve the issue, proceed to the next step.

Step 2: Install the Scheduled Post Trigger Plugin

This plugin checks for missed WordPress tasks and automatically reschedules them whenever someone visits your website. It serves as a tool to monitor periodic tasks linked to WordPress Cron Jobs. Simply install and activate the plugin for seamless operation.

These are straightforward ways to address issues with publishing scheduled posts on WordPress. I hope you find these solutions helpful in managing similar scenarios on your WordPress site.

Rate this post

Related posts