WordPress has a feature called WP-Cron, which can be used to schedule posts. While WP-Cron can be useful it is not as powerful as a real cron job. This guide will show you how to set up a real cron job to make posts to your WordPress blog.
The wp-config.php file can be found in the same directory your WordPress is installed to. Edit the file and add this line to the top of the page:
Setting Up the Cron Job
- In your cPanel account, select the "Advanced" section, then select "Cron Jobs".
- Under "Add New Cron Job", select the interval the cron job will be set up on. To reduce server load, we suggest you set the interval no shorter than 15 minutes.
- Enter the following code for the cron command. Be sure to replace the domain with your actual domain.
wget -q -o - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
- Select "Add New Cron" to finalize.
The server will now run wp-cron using wget. The wp-cron.php scrip will do what you want it to do one your schedule now, rather than on page loads.