Packaging in Sitecore - creation and installation

Pranay
May 24, 2020  ·  12689 views

This article will explain how to create a package in Sitecore and how to install it on another Sitecore instance. Or in short to move/deploy a set of changes from one instance to another Sitecore instance.

This is normally used when we would like to move changes from one instance (could be your local sitecore instance) of Sitecore to another instance (could be a shared sitecore instance running on a development server used by your team).

To deploy a set of changes, we should consider the following things:

  1. Sitecore item changes – all the chnags we make in the Sitecore content editor and media library.
  2. All the code changes we make in the sitecore .NET solution i.e., controller classes, models, view files etc which we use in renderings.

Creating package in Sitecore

  1. Login to Sitecore admin account in desktop mode. Open sitecore control panel and go to ‘Development tools’->’Package Designer’.
  2. Click on ‘Items Statically’ option at the top and then a dialogue box will appear. Select the database as ‘master’
  3. Select the item which you want to export and then click on either ‘Add with Subitems’ or ‘Add Item’. Continue the same for each item as you will not be able to add all the items at a time. If you would like to move entire website, then select the root item ‘Sitecore’ and select ‘Add with Subitems’.
  4. Click next and provide a source name, and click finish.
  5. Now at the top left corner, under the Sources, the new source what we have just created will be listed.
  6. Just below the ‘Items statically’ option, there will be another link ‘Files statically’, select that.
  7. Select all the solution files which you would like to move. Including .cshtml, dll file etc and click on ‘Add path’. Click next and provide Source name.
  8. Under the Sources, this new source will also be listed.
  9. Now click on ‘Generate zip’, provide a name and click on Next. If you click on finish and check the path ‘SitecoreInstanceFolder/Data/packages’ you could see the package zip file. If you cannot access the path then you can directly download the zip file from bowser instead of clicking on Finish. (There will be button next to the text ‘Click this button to download the package:’).

Installing a Sitecore package

Login to Sitecore admin panel to which you want to import a Sitecore package.

  1. Inside developer tools, open Installation wizard.
  2. Then upload the package which you want to import.
  3. Once the upload is completed, click next and provide package name, Version, Author, publisher etc. All these fields are optional. So you can continue even without filling these.
  4. Once the installation is complete, you will be asked for Restart of Sitecore Client or Sitecore Server. Select accordingly and click finish.
  5. Now publish the changes (either the root or the new items which you imported) to reflect. That’s it. Your sitecore package is imported now.
AUTHOR

Pranay

A Software Engineer by profession, a part time blogger and an enthusiast programmer. You can find more about me here.


Post a comment




Thank you! You are now subscribed.

Sign up for our newsletter

Subscribe to receive updates on our latest posts.

Thank you! You are now subscribed.