What Is wp-cron in WordPress?
Ahsan Parwez
HostWP Expert
wp-cron is WordPress’s built-in task scheduler. It handles background tasks like publishing scheduled posts, checking for plugin updates, and clearing expired data. Unlike a real server cron, it only runs when someone visits your site.
Detailed Answer
- wp-cron is how WordPress automates time-based tasks without needing direct server access. Here is what you need to know:
- How it works: Every time a page loads, WordPress checks if any scheduled tasks are due. If they are, it runs them in the background.
- Common tasks: It publishes scheduled posts, sends pingbacks, checks for core/plugin/theme updates, and cleans up old database transients.
- The traffic problem: On high-traffic sites, wp-cron runs too often and can slow down page loads. On low-traffic sites, tasks might not run on time because no one is visiting to trigger it.
- The fix: Most developers disable the default wp-cron by adding define(‘DISABLE_WP_CRON’, true); to the wp-config.php file, and set up a real server cron job to run every 5 or 15 minutes instead.
wp-cron is handy, but it can actually slow down your site because it runs every single time someone loads a page. If your site gets a lot of traffic, it’s constantly checking for tasks in the background. The best fix is to disable the default wp-cron and set up a real server cron job instead. At HostWP.io, we handle server-level cron jobs automatically, so your scheduled posts and updates run on time without slowing down your site.
Our WordPress expert are here to help you 24/7.
On this page
Related Questions
Expert WordPress Support Engineers Available 24/7
90 sec
Average
Response Time
98 %
Customer
Rating
24/7
Expert
Support

