If your hosting environment throttles WordPress’s built-in task scheduler — or if you need feeds to refresh at a precise time that the plugin’s hourly, twice-daily, or daily intervals don’t match — you can drive feed refreshes from a server-level cron job instead. This gives you exact control over timing and avoids relying on visitor traffic to trigger WordPress’s scheduler.
Common symptoms: feeds stuck on old data, refresh times that drift between visits, or hosting environments that disable wp-cron.
Product Feed Pro and Product Feed Elite both support two approaches: a WP-CLI command (recommended) and a standalone PHP script for servers without WP-CLI.
Before you start
- Product Feed Pro or Product Feed Elite installed and active
- At least one product feed created and configured
- SSH or cPanel access to your server to add cron jobs
- Your feed ID (see Step 1 in either method below)
- Version 13.5.4 or later for WP-CLI support
Method 1: WP-CLI (recommended)
WP-CLI is available on most managed WordPress hosts. It’s the simplest and most reliable way to trigger a feed refresh from a server cron job — no PHP file to manage, no WordPress bootstrapping required.
Step 1: Find your feed ID
- Go to Product Feed → Manage Feeds in your WordPress admin.
- Click the feed you want to refresh.
- Look at the browser URL bar. The feed ID is the value of the
idparameter — for example,admin.php?page=adt-edit-feed&id=123means your feed ID is123.
Step 2: Disable the built-in refresh interval
To prevent the plugin’s scheduler from running a duplicate refresh alongside your cron job:
- While editing the feed, go to the General tab.
- Set Refresh interval to No Refresh.
- Click Save Changes.
Step 3: Add the server cron job
On your server, add a cron entry that runs wp adt-feed refresh at your chosen schedule. Replace /path-to-wordpress with your site’s actual root directory and 123 with your feed ID:
0 2 * * * cd /path-to-wordpress && wp adt-feed refresh 123 >> /tmp/feed-refresh-123.log 2>&1
This example runs at 2:00 AM every day. Adjust the schedule expression to match your needs.
To refresh multiple feeds in a single cron job, list their IDs separated by spaces:
0 2 * * * cd /path-to-wordpress && wp adt-feed refresh 123 456 789
Method 2: PHP script
Use this method if your server doesn’t support WP-CLI.
Step 1: Find your feed ID
Follow the same steps as in Method 1, Step 1 above — click your feed to edit it and read the id= value from the URL.
Step 2: Create the PHP script
Create a new file called feed-refresh-123.php (replace 123 with your feed ID) and save it in your child theme directory — for example, wp-content/themes/your-child-theme/feed-refresh-123.php.
Add this code to the file, replacing 123 with your actual feed ID:


