Technical Tips

How to Configure Cron Job on WordPress Site

Windows Server

  1. Login to your Windows Server
  2. Press Windows Button and search for Task Scheduler
  3. Under Action tab, click on Create Task image
  4. Fill in the NameDescriptionRun whether user is logged on or notConfigured for: The Version you're using image
  5. Under Trigger tab, add a new Trigger and select: Begin the task: on a schedule Repeat task every 15 minutes For a duration of indefinitely
  6. Click Ok image
  7. Open command prompt by hitting Windows Button + r, input cmd and press enter image
  8. Run this command echo curl https://yourdomain.com/wp-cron.php > %userprofile%\desktop\cron.bat. Be sure to replace yourdomain.com with your Domainimage
  9. Now back to Task Scheduler. Under Actions tab. Create a new action and browse for the script we created in previous step and press OK image
  10. Under Settings tab, check the box Run task as soon as possible after a scheduled start is missed image

Linux Distros

  1. Login to your VPS/VM
  2. execute the command crontab -e and select the easiest, in our case it’s 1 image
  3. Go to the bottom of the file and key in */15 * * * * curl https://yourdomain.com/wp-cron.php > /dev/null 2>&1. Be sure to replace yourdomain.com with your Domain
  4. Press Ctrl + O then Enter then Ctrl + X

Shared Hosting

CPanel

  1. In CPanel, look for Cron Jobs, your UI might be different, but the process is the same image
  2. Ensure your settings is the same as the image below. Be sure to replace yourdomain.com with your Domain in the command curl https://yourdomain.com/wp-cron.php image
  3. Click on Add New Cron job

Plesk

  1. Select cronjob under Tools & Settings -> Tools & Resources -> Scheduled Tasks (Cron Jobs) image
  2. Click on Add Task image
  3. Make sure your settings are as below and replace yourdomain.com with your Domain
    Task type: Run a command
    Command  : curl https://yourdomain.com/wp-cron.php
    run      : Cron style */15 * * * *
    

image 4. Click OK

Popular Hosting Companies Cron job setup

Set the Cron schedule to */15 * * * * (15 minutes every day) Set the command to curl https://yourdomain.com/wp-cron.php (replace yourdomain with your Domain

  1. GoDaddy https://www.godaddy.com/help/create-cron-jobs-16086
  2. Bluehost https://my.bluehost.com/hosting/help/411
  3. HostGator https://www.hostgator.com/help/article/how-do-i-create-and-delete-a-cron-job
  4. SiteGround https://www.siteground.com/tutorials/cpanel/cron-jobs/
  5. Namecheap https://www.namecheap.com/support/knowledgebase/article.aspx/9453/29/how-to-run-scripts-via-cron-jobs/
  6. Hostinger https://support.hostinger.com/en/articles/1583465-how-to-set-up-a-cron-job-at-hostinger

Leave a Reply

Your email address will not be published. Required fields are marked *