# Sync single content items and pages

## Overview

> info **PREREQUISITES**: To be able to sync a single item or page, make sure:
>
> * You have activated and configured the SiteSync module.
> * You have permissions to *Sync pages and content items*, located under *Administration » Permissions » SiteSync*.

In addition to syncing the entire site or elements of it using the SiteSync module, you can sync only a single content item or a page.\
You can sync them from the grid, or publish and sync them after editing them.

This feature gives you the option to immediately sync small changes, such as typos, without having to perform a sync of the entire modules or sites. For regular syncs, use the SiteSync module.

> info **NOTE**: You can sync only items or pages that you are allowed to publish. For example, if there is an active workflow and you only have the option to send an item for approval, you do not have the option to sync the item. Items that are awaiting approval can only be published and synced if the user syncing them can skip workflow.\
> For more information, see [Define workflows](https://www.progress.com/documentation/sitefinity-cms/define-workflows).

> info **NOTE**: These options do not automatically sync structure or data. They only give the user who is performing the site sync to be able to choose these options.\
> For more information, see [Promote content with SiteSync](https://www.progress.com/documentation/sitefinity-cms/promote-content-with-sitesync) » *Select which content to promote*.

> important **IMPORTANT**: You cannot sync custom fields of built-in modules using the single item sync. If your modules have custom fields that you want to sync, use the SiteSync via the *Administration* page.

## Sync dependencies

When you want to sync a single item or page, the system also automatically syncs the following dependent structures and content:

* If you reorder a page, the new page structure is also synced.\
  For example, if you move one page under another and then sync it, using *Publish and Sync*, the parent page is synced as a dependency of the child page.
* If the item or page has related data or related media items, they are also synced.
* If you change the permissions of an item or page and then sync it, the permissions are synced, if you have configured the SiteSync module to sync permissions.
* If on the page that you want to sync, you have a single media widget – *Image*, *Video*, or *Document* widget, the changes to that widget are automatically synced when you sync the page, by using *Publish and Sync*.
* If on the page that you want to sync, you have added or edited an image in the text of any other widget, for example a code block, this image is automatically synced in the *Images* module of the target server.
* If you have a Content block or a content item with a *Long text* field, and you add a link pointing to another page on your Siteifnity CMS site, you can configure whether SiteSync syncs the linked page when you sync the content item with the link.\
  To change this configuration, log into Sitefinity CMS backend, navigate to *Administration » Settings » Advanced » SiteSync* and toggle *Include page links as dependencies*.

  > info **PREREQUISITES**: This setting is available in Sitefinity CMS 15.4.8642 or newer.

> important **IMPORTANT**: If you have modified the template of a page that you want to sync, the template will not be synced, because it can affect other pages. In this case, you cannot use the single item sync. You can sync these changes using the SiteSync module or from the template page. For more information, see [Page templates](https://www.progress.com/documentation/sitefinity-cms/overview-page-templates).

## Sync child items automatically

> info **PREREQUISITES**: You need Sitefinity CMS version 15.4.8632 or newer to be able to sync child items automatically.

By default, when you select a hierarchical content item - for example, a media library, a page, a cathegory, or a hierarchical dynamic content item, Sitefinity CMS synchronizes only the parent content item and the child items you explicitly select for sync.

When you routinely have hundreds or thousands of changed child items, it can be impractical to select every child item separately.\
In this case, you can turn on an option to automatically sync all child items when you select a parent item.

This option affects the following content types:

* Pages\
  Child pages and the related media they contain, such as images and videos.
* Hierarchical items\
  Items contained in libraries: *Images*, *Documents & Files*, *Videos*, and child *Libraries*.
* *Blogs* and *Lists*
* Hierarchical *Classifications*
* Hierarchical *Dynamic content types*.

To turn on automatic sync of child items, perform the following:

1. Log in to Sitefinity CMS backend with administrator account.
2. Navigate to *Administration » Settings » Advanced » SiteSync*.
3. Select the *Sync child dependencies automatically* setting.
4. Save your changes.

> success **RESULT**: Every time you sync a parent hierarchical item or a page, Sitefinity CMS will also automatically sync its child items and dependencies.

## Advanced settings

### Log data events synchronously

When enabled, every *Publish* operation is synchronously logged for syncing and not queued as background tasks. Thus, the order of the sync operations is predictable.\
You can consider turning this setting on only when multiple content editors are often publishing the same content items at the same time.

> info **PREREQUISITES**: This setting is available in Sitefinity CMS 15.4.8642 or newer.

1. Log in to Sitefinity CMS backend with administrator account.
2. Navigate to *Administration » Settings » Advanced » SiteSync*.
3. Select the *Log data events synchronously* setting.
4. Save your changes.

## Procedure

To sync a single item or a page, perform the following:

1. Navigate to the item or page that you want to sync.  You can sync a single item or page in one of the following ways:
   * From the *Actions* menu in the backed page of the module.\
     For example, if you want to sync a single *News* item, navigate to the *News* page and expand the *Actions* menu.
   * From the *More Options* menu when you are editing an item.\
     For example, if you want to sync an *Event* while you are editing its text, expand the *More Options* menu.
2. Click *Sync*.
3. Confirm the sync.\
   After you click *Sync*, a confirmation screen appears.\
   The confirmation screen displays information about the dependencies that the item has. For example, if the item has a related image, it will also be synced.

   Depending on the item's state, you confirm to either publish and sync, or just sync the item. For more information, see *Single item sync and item state, workflows* below.

   If you have configured the SiteSync with more than one target servers, a dropdown box appears on the confirmation screen where you must choose the target server where you want to sync the item.

   > info  **NOTE**: If you want to sync the item to more than one server, you need to perform the procedure for each of the desired servers.
4. You receive a message confirming that the content has been sent for sync. If the item has no changes, the message notifies you that nothing has been sent for sync. You are free to continue working and will be notified via the notification system when the content is synced.

## Single item sync and item state, workflows

Items have different actions buttons and vary in the results of the sync, depending on their state. The table bellow provides an overview of the item state, action available, and the expected result of the sync.

| Item state                 | Action           | Result                                                                                                                    |
| -------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Published                  | Sync             | The item is published in the target site.                                                                                 |
| Unpublished                | Sync             | The item is unpublished, syncing it removes it from target site.                                                          |
| Scheduled for publish      | Sync             | The item is synced in state scheduled for publish and will be published on the target site according to the schedule.     |
| Scheduled for unpublish    | Sync             | The item is synced in state scheduled for unpublish and will be unpublished on the target site according to the schedule. |
| In Approval Workflow       | Publish and sync | The item is published and synced.                                                                                         |
| Draft                      | Publish and sync | The item is published and synced.                                                                                         |
| Draft newer than published | Publish and sync | The item is published and synced.                                                                                         |
| Locked items               | Publish and sync | The item is published and synced only by the person that locked it.                                                       |

## Bulk sync of items

You can select multiple items to sync them in bulk. Some of the items might not be synced, depending on their state. For more information, see *Bulk Sync of items with different state* below.\
To sync items in bulk:

1. Navigate to the page or module of the items you want to sync.\
   For example, if you want to sync news items, navigate to *Content » News*.
2. Select the items that you want to sync.
3. Click *Bulk actions » Sync*.
4. Confirm the sync.\
   When you sync in bulk, item dependencies are calculated and synced, but not shown in the confirmation screen. Bulk sync overrides item permissions.\
   If you have configured the SiteSync with more than one target servers, a dropdown box appears on the confirmation screen where you must choose the target server where you want to sync the item.

> info  **NOTE**: If you want to sync the item to more than one server, you need to perform the procedure for each of the desired servers.

## Bulk sync of items with different states

When you sync items in bulk, some of them might not be synced or the sync result might be different than the one you expected. The table below provides an overview of what happens when you sync items in bulk.

<table>
<tbody>
<tr>
<td>

<strong>Item state</strong>

</td>
<td>

<strong>Result</strong>

</td>
</tr>
<tr>
<td>

Published

</td>
<td>

The item is published in the target site.

</td>
</tr>
<tr>
<td>

Unpublished

</td>
<td>

The item is removed from the target site.

</td>
</tr>
<tr>
<td>

Scheduled for publish

</td>
<td>

The item is synced in state scheduled for publish and will be published on the target site according to the schedule.

</td>
</tr>
<tr>
<td>

Scheduled for unpublish

</td>
<td>

The item is synced in state scheduled for unpublish and will be unpublished on the target site according to the schedule.

</td>
</tr>
<tr>
<td>

In Approval Workflow

</td>
<td>

* If the item is first published in the source site and then the status is changed to Awaiting Approval, the item is synced with status Awaiting Approval.
* If Awaiting Approval is the first state of the selected items, syncing will prompt a successful sync message, but nothing will be synced.

</td>
</tr>
<tr>
<td>

Draft

</td>
<td>

Draft items are not synced in bulk.

</td>
</tr>
<tr>
<td>

Draft newer than published

</td>
<td>

The item is synced in status Draft newer than published.

</td>
</tr>
<tr>
<td>

Locked items

</td>
<td>

Sync only by the person that locked the item. The last published version of this items will be synced to the target site.

</td>
</tr>
</tbody>
</table>

## Sync status and sync history

After syncing a single item or page to a target server, the system allows you to view the status of this operation. For all the versions of an item, you can see which have been sync, when, and with which target server.

You can see this in the revision history of an item or page. For each version of an item, you have the sync information, including timestamp, sync status, and target server. If the column is empty, the item has never been synced.
