Disable WP-Cron and Use a Real Server Cron Job

WP-Cron runs on every page load, which can cause overhead on high-traffic sites or missed events on low-traffic sites. You can disable it and use a real server cron job instead. For more on optimizing wp-config.php.

Step 1 – Add to wp-config.php:

define( 'DISABLE_WP_CRON', true );

Step 2 – Set up a server cron job (every 5 minutes):

*/5 * * * * wget -q -O /dev/null https://your-domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Replace your-domain.com with your domain.

Discussion
[  0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!