> For the complete documentation index, see [llms.txt](https://docs.overflowcms.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overflowcms.com/editor-guide/publishing-workflow.md).

# Publishing Workflow

## Publishing Workflow

#### Statuses

An item is always in one of three states: **draft**, **published**, or **scheduled**. Only `published` items are ever returned by the public API — the draft `data` you're editing and the live `publishedData` snapshot are stored separately, so half-finished edits to a published item never leak out until you explicitly publish again.

![Content grid with published items and their status badges](https://overflowcms.com/images/docs-screenshots/collection-content.png)

The content table is paginated and every column is sortable — click a header to sort by it, click again to reverse. Use **Rows per page** and the page controls at the bottom to move through the rest; this keeps a large collection (say, right after importing from Webflow) just as fast to browse as a small one, since only one page of rows is ever loaded at a time.

#### Publish

Hitting **Create & publish** (or **Publish** on an existing draft) does three things in one step: copies the current `data` into `publishedData`, flips `status` to `published`, and updates the sort/filter index for any indexed fields. It also bumps a per-site cache marker so the public API stops serving stale cached responses — changes are visible at the edge within seconds, no Webflow republish required.

#### Publishing to Production vs. Staging

Every publish can also say **where** it goes live — the same way Webflow's own Publish button lets you pick which domains to push to. This is entirely opt-in: a site that never sets up a staging URL behaves exactly as before, publishing everywhere on every publish.

**1. Tell OverflowCMS where the site actually lives.** On the site page, set a **Production URL** and, if you use one, a **Staging URL** (your `*.webflow.io` domain) under **Domains**:

![Site page — Domains card with production and staging URL fields](https://overflowcms.com/images/docs-screenshots/site-domains.png)

Nothing else changes on the page itself. The embed script detects which environment it's running on from the page's own URL, automatically, on every load — no extra markup, no separate embed code for staging.

**2. Pick a target when you publish.** Once a staging URL is set, the **Publish** button on an item becomes a split button: the main half publishes with whatever's currently checked, and the chevron opens a dropdown to choose Production, Staging, or both:

![Item editor — the split Publish button with its Production/Staging dropdown open](https://overflowcms.com/images/docs-screenshots/item-publish-target.png)

This is a genuine per-publish choice, not two copies of the same content sitting side by side — an item published to Staging only won't appear in the JSON API or the embed when the request is coming from your production domain, and vice versa. Preview a change on staging, then re-publish to Production once it looks right, without ever taking the item down in between.

{% hint style="info" %}
If a site has no staging URL configured, every item just publishes everywhere, same as before this existed — there's nothing to opt into, and nothing changes for you.
{% endhint %}

#### Editing a published item

Saving changes to an already-published item updates its draft `data` but does **not** touch `publishedData` until you hit **Publish changes** again — so you can safely edit a live post without it going out half-written. The save uses optimistic locking: it sends the timestamp of the version you started editing, and if someone else saved in the meantime, you get a conflict instead of silently overwriting their change.

#### Unpublish

Reverses publish — the item stops being served publicly and drops out of the sort/filter index, but its data isn't deleted.

#### Scheduling

Setting a future publish time marks an item `scheduled` instead of publishing immediately; a background sweep checks for due items and publishes them automatically once their time arrives.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.overflowcms.com/editor-guide/publishing-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
