If you want to move any Sitecore items from one instance to another then we currently use Packaging or Serialization as an OOTB solution. Many times we create a package of the items where it’s template or related items (media library items or rendering items) are missed and we understand it once the package is installed on another instance.
We were carrying out R&D on how can we do it efficiently and found an solution, that we can use Sitecore PowerShell Extension (SPE) for this request.
You can download the latest SPE from here. From the documentation site you can follow the installation steps.
It is rich tool that can be used to address your various requests and the documentation for the same can be found here.
Once the package is installed. You can see the Scripts option when you right click on any item.
Lets understand the steps on how to create the package and download it.
- Go to the Content Editor and navigate to the item for which you want to create a package.
- Right Click on the item and click on the Scripts.
- Click on Packaging >> Start New Package.
- Select the option between – Add Item to Package or Add Tree to Package. In case you want the single item to be the packaged then go for ‘Add Item to Package’. In case you want the item with it’s child/descendants then go for ‘Add Tree to Package’.
- By default the Installation options are Merge – Merge but it better to select ‘Ask User’. In the ‘Include Linked items’ you can select the options based on your requirement. In this example I want the template and related Media item to be packaged.
- Click OK. The process will run the script.
- Once the process is completed, the pop up will disappear.
- Right click on the item >> Scripts >> Packaging >> Download Package.
- Fill in the details like Author, Publisher, Version, etc and click OK.
- The pop up to download the package will appear. Click on Download to download the package.
The package of the item with it’s related items is created successfully. Lets learn how to add the multiple items in a single package in next blog.
Thank you.. Keep Learning.. Keep Sitecoring.. 🙂
Pingback: Creating package using Sitecore Powershell Extensions (SPE) for multiple items | Sitecore Diaries