Skip to main content

Saving, publishing and deleting content

🏗 Work in progress

The content of this page might not be fully up-to-date with Strapi 5 yet.

Strapi allows you to manage your content throughout its whole lifecycle, whether you are working on its draft version, about to finish it and share it with the world, or wanting to delete it when it's obsolete.

Saving & publishing content

Caution

The possibility to manage drafts for contents comes from the Draft & Publish feature. This feature is activated by default, but it can be deactivated for any content-type from the Content-type Builder (see advanced settings for content-types). If you disabled the Draft & Publish feature, saving your content means saving and publishing at the same time.

Your content can have 3 statuses:

Status nameDescription
PublishedThe content was previously published.
There are no pending draft changes saved.
ModifiedThe content was previously published.
You made some changes to the draft version and saved these changes, but the changes have not been published yet.
DraftThe content has never been published yet.

In the Content Manager edit view (the view you see when editing an entry), the current status of an entry is indicated at the top of the interface, just below the entry title.

Editing draft versionEditing draft version

Working with drafts

While editing a document, you can see 2 tabs:

  • The Draft tab is where you can edit your content.
  • The Published tab is a read-only tab where edition of all fields is disabled. The Published tab only exists to show what is the content of fields in the published version.

By default, each newly created content is a draft. Drafts can be modified and saved at will, using the Save button in the Document box on the right of the edit view, until they are ready to be published.

Once you made changes to a draft, you have 3 possible options, all available in the Document box on the right side of the edit view:

  • Publish your document (see publishing a draft),
  • Save your draft for later retrieval,
  • or discard changes, by clicking on More icon and choosing Discard changes icon Discard changes.

Publishing and unpublishing

While editing a document, you can decide to publish a draft or unpublish previously published content.

Publishing a draft

To publish a draft, click on the Publish button in the Document box on the right of the content editor.

After a draft is published:

  • The content of the Draft and Published tabs should be exactly the same (but the Published tab remains read-only).
  • The status, below the document's title, will switch to "Published".
Caution

Before publishing a draft, make sure it doesn't have relations with other non-published content, otherwise some of the content may not be available through the API.

When a document has both a draft and a published version available, the published version can be found in the Published tab. If the document has only a draft version, you can not click on the Published tab.

Editing published versionEditing published version
💡 Tip

To schedule publication, i.e., convert a draft to a published entry at a given date and time, you can include it in a release and schedule the publication of the release.

Unpublishing content

Previously published content can be unpublished.

To unpublish content, from the Draft tab, click on More icon in the Document box on the right of the content editor and choose the Unpublish button.

If the draft version of the document contains content different from the published version, you can decide what to do with both content when unpublishing:

  1. From the Draft tab, click on More icon in the Document box on the right of the content editor and choose the Unpublish button.
  2. In the Confirmation dialog that opens, you can choose to:
    • Unpublish and keep last draft, so that all the content you currently have in the Draft tab is preserved, but the all the content from the Published tab is definitely gone
    • Unpublish and replace last draft to discard any existing content in the Draft tab and replace it with the content of all fields from the Published tab
  3. Click Confirm. The desired changes will be applied to both the Draft and Published tabs and the new status of the entry will also be reflected below the entry title.
Unpublish a documentUnpublish a document

Bulk publishing and unpublishing

Selecting multiple entries from the Content Manager's list view will display additional buttons to publish or unpublish several entries simultaneously. This is what is called "bulk publishing/unpublishing".

Caution

If the Internationalization plugin is installed, the bulk publish/unpublish actions only apply to the currently selected locale.

Selecting entries for bulk publish/unpublish

Bulk publishing drafts

To publish several entries at the same time:

  1. From the list view of the Content Manager, select your entries to publish by ticking the box on the left side of the entries' record.

  2. Click on the Publish button located above the header of the table.

  3. In the Publish entries dialog, check the list of selected entries and their status:

    • Success icon Ready to publish: the entry can be published
    • Fail icon "[field name] is required", "[field name] is too short" or "[field name] is too long": the entry cannot be published because of the issue stated in the red warning message.
  4. (optional) If some of your entries have a Edit icon status, click the Edit icon edit buttons to fix the issues until all entries have the Success icon Ready to publish status. Note that you will have to click on the Refresh button to update the Publish entries dialog as you fix the various entries issues.

  5. Click the Publish button.

  6. In the confirmation dialog box, confirm your choice by clicking again on the Publish button.

Bulk unpublishing content

To unpublish several entries at the same time:

  1. From the list view of the Content Manager, select your entries to unpublish by ticking the box on the left side of the entries' record.
  2. Click on the Unpublish button located above the header of the table.
  3. In the confirmation dialog box, confirm your choice by clicking again on the Unpublish button.

Deleting content

You can delete content by deleting any entry of a collection type, or the default entry of a single type.

  1. In the edit view of the entry, click on More icon at the top right of the interface, and click the Delete document button.
    If Internationalization is enabled for the content-type, you can also choose to delete only the currently selected locale by clicking on the Delete locale button.
  2. In the window that pops up, click on the Confirm button to confirm the deletion.
💡 Tip

You can delete entries from the list view of a collection type, by clicking on More icon on the right side of the entry's record in the table, then choosing the Delete icon Delete document button.
If Internationalization is enabled for the content-type, Delete document deletes all locales while Delete locale only deletes the currently listed locale.