Skip to content

How feeds are written

Writing a feed is called a run. Each run:

  1. Picks the products that pass the feed’s rules, as a list of IDs.
  2. Starts a new temporary file in wp-content/uploads/product-feeds/tmp/, ending in .part.
  3. Writes the products in batches, as background jobs in Action Scheduler (the queue that comes with WooCommerce), with a short pause between batches.
  4. When the last batch is written, renames the temporary file over the feed file in one step.

Until that last step the old file stays online, unchanged. The address never serves a half-written or missing file.

A run that ends with no items at all does not replace the file. The feed stops with “No products match the rules of this feed. The last good file stays online.” This guards against a filter mistake or a broken import emptying the catalog on every channel at once.

If a run fails for any other reason (the folder is not writable, the file cannot be replaced), the feed’s status turns to “Stopped”, the reason is written to the log, and the old file stays online. The next scheduled run tries again.

A feed is written by one run at a time. Clicking Regenerate on a feed that is already being written shows “This feed is already being written.” and changes nothing.

If a run dies half-way (the server restarts, PHP runs out of memory), the feed shows as writing for up to two hours. After that the next run takes over. Leftover temporary files older than a day are cleaned up.

  • The schedule. Every 15 minutes the plugin checks which feeds are due, using each feed’s Refresh every and Daily runs start at.
  • Product edits. When a product or variation is saved, its stock changes, or it goes to the trash, a run is planned five minutes later for every feed that has Update when a product changes on. Edits made in the meantime join the same run, so a bulk edit of a hundred products costs one run, not a hundred.
  • Regenerate on the Feeds tab, and Save and regenerate on the Edit feed screen.
  • WP-CLI, see below.
  • With Pro, your server’s cron, see Run from your server.

A Pro local inventory feed is written right after the Google Shopping feed it is linked to.

Set in the Schedule section of each feed:

Field What it does Default
Refresh every Hours between runs. 24
Daily runs start at For feeds that refresh every 24 hours or more: the time of day, in the site’s timezone, after which the run may start. 03:00
Update when a product changes Price and stock edits reach the feed within minutes. On

A feed that has never been written is due straight away. Because the check runs every 15 minutes, a feed due at 03:00 starts between 03:00 and about 03:15.

Product Feed > Settings holds what all feeds share. Click Save changes to keep them.

The strip at the top shows the Queue (how many feeds are being written), the Batch size, the Next check of the schedule, and whether a run after product edits is Waiting for changes.

The free plugin has one way to run feeds, In the background: Action Scheduler, the queue that comes with WooCommerce. It runs on WordPress cron, so on a quiet site with few visits a run can start late. For exact timing, run wp product-feed generate from your server’s cron, or use the Pro option From your server, which turns this panel into a choice between the two.

Field What it does Default Range
Products per batch Products written in one background job. Lower it if the host times out. 200 20 to 2000
Pause between batches Seconds to wait before the next batch. 2 0 to 60

Update feeds after product edits is the shop-wide switch for runs after edits. With it off, no feed is updated after an edit, whatever the feed says. With it on, each feed can still opt out in its Schedule section.

Moves the Product Feed page under WooCommerce or Products. See Where the menu lives.

Two commands, under wp product-feed.

List the feeds, with their ID, name, channel, status, item count and address:

Terminal window
wp product-feed list

Write one or more feeds now, in this process, without waiting for the schedule:

Terminal window
wp product-feed generate 3
wp product-feed generate 3 5 8
wp product-feed generate all

For each feed it prints the number of items, the time taken and the address, or a warning with the reason it stopped. A feed that is already being written is not started twice.

Product Feed > Logs lists the runs of the last 30 days, newest first, up to 200 rows.

  • All, Runs and Problems filter the list. The number next to Problems counts the runs that stopped.
  • All feeds narrows the list to one feed.
  • Each row shows When, Feed, What happened (“Feed ready” or “Stopped”), Items and Took.
  • A row with a message opens on click to show it, with a link to Open the feed.

The log also records when an old feed plugin was switched off from the Import tab, with the folder its files were moved to.

Channels read the feed from its /feeds/ address. The plugin answers with the file’s type, a noindex header, and Last-Modified and ETag headers, so a channel that already has the latest file gets a short “not modified” answer. Public feeds may be cached for five minutes; private feeds are never cached by shared caches.

Deactivating stops the schedule and removes the /feeds/ address, so channels get an error until you activate it again. The feed files and settings stay. Activating it again brings everything back.