Feed sync & cron
Three things keep a feed current: cron, the queue consumers, and a valid token.
Cron jobs
| Job | Schedule | Purpose |
|---|---|---|
wk_instagram_enqueue_account_sync | Follows Sync Frequency | Queues a sync for every active account |
wk_instagram_refresh_tokens | 03:00 daily | Renews tokens expiring within 7 days |
wk_instagram_purge_media | 03:30 daily | Deletes posts past the retention window |
wk_instagram_auto_tag_media | Hourly at :15 | Suggests product tags |
wk_instagram_refresh_product_gallery_urls | Hourly | Renews the Instagram CDN links behind posts attached to product galleries, before they expire |
Sync Frequency (Every 15 minutes / Hourly / Daily) rewrites the sync job's schedule when you save configuration.
Check cron is alive:
bin/magento cron:run
"Indexers are invalid" means cron is not running
If the admin shows One or more indexers are invalid. Make sure your Magento cron job is running, nothing on this page happens automatically.
Queue consumers
| Consumer | Work |
|---|---|
wkInstagramAccountSync | Pulls posts for one account, plus its tagged media |
wkInstagramMediaMirror | Downloads images and video into your media folder |
wkInstagramStatsIngest | Aggregates storefront analytics events |
bin/magento queue:consumers:start wkInstagramAccountSync
bin/magento queue:consumers:start wkInstagramMediaMirror
bin/magento queue:consumers:start wkInstagramStatsIngest
In production let cron_run start them, or run them under supervisor — both standard Magento approaches work.
Syncing on demand
Instagram Feed → Accounts → Select → Sync now queues an immediate sync. The grid shows the last sync time and last error per account.
Tokens
Instagram's long-lived tokens last 60 days.
- OAuth accounts renew themselves seven days before expiry, provided cron runs.
- Manual tokens cannot be renewed automatically; you get an admin notification seven days out.
An account with a lapsed token shows Token invalid and stops syncing. Its already-mirrored posts keep rendering.
API quota
Posts Per Account (default 50, max 200) caps how many posts each sync requests. Instagram bills every request against your app quota, so a higher value costs quota on every run. If a rate limit is hit, the module backs off and logs it rather than hammering the API.
Storage
Mirrored media lives in pub/media/instagramfeed/. Budget roughly the size of the posts you keep — 500 mixed image and short-video posts is usually under 1 GB. Retention is what bounds this over time.
Rebuilding category tags
A Category Context feed matches posts to the category being viewed, using tags derived from each post's tagged products. Change a product's categories and those derived tags go stale until the next sync touches the post.
bin/magento webkul:instagramfeed:sync-category-tags
Rebuilds them for every post from its current product tags. Safe to re-run; it recalculates rather than appends. Worth running after a bulk catalog import or a category restructure.
See also
- Connect an account — token lifetime and renewal
- Media Library — what retention purges, and what it never touches
- Troubleshooting — when a sync produces nothing
