---
title: Configuring a custom Cron job in WordPress Using Command line.
description: "To set up a WordPress cron job using the command line, follow these steps: 1. Log in to your account using SSH. 2. At the command prompt, type the following command: *crontab -e* 1. Type o to enter editing mode and start a…"
url: "https://truehost.com/support/knowledge-base/configuring-custom-cron-job-wordpress-using-command-line/"
updated: "2024-06-21"
category: WordPress
---

# Configuring a custom Cron job in WordPress Using Command line.

To set up a WordPress cron job using the command line, follow these steps:

1. Log in to your account using SSH.
2. At the command prompt, type the following command:

*crontab -e*

1. Type o to enter editing mode and start a new line of text.
2. Type the following line, replacing *username *with your own cpanel account username:

*/30 * * * *  cd /home/*username*/public_html; /usr/local/bin/php -q wp-cron.php

NB:This line sets the cron job to run every 30 minutes.

1. Press Esc, type : wq and then press Enter. The new cron job settings take effect immediately.
