1

How can I copy a Sitecore 10 site from one environment to another?

I've created a site package and installed it in the new environment, but the site isn't appearing in the SXA site manager.

Is there more effective way to install a site from one environment to another?

Here are the steps, I am following to copy site from environment A to environment B.

1- In environment A, create a new package that includes the Site tenant and all its descendants.
2- Install this package into environment B.
3- Include the Site grouping in the Sites item located at /sitecore/system/Settings/Foundation/Experience Accelerator/Multisite/Management/Sites.
4. Check the site in the SXA site manager and its shows `ok` state.
5. Accessing the site URL gives the 404 error.

I have not published the installed package into the web database.

4
  • Have you tried? - doc.sitecore.com/xp/en/developers/sxa/102/… Apr 12, 2023 at 2:34
  • @SumitHelaiya yeah, I had already tried this. My site state is ok. Apr 12, 2023 at 2:52
  • So your site is appearing in the site manager in an ok state. So you need to know the steps for package creation now right? If yes please update the description accordingly as it mentions site isn't appearing in the SXA site manager. Apr 12, 2023 at 3:02
  • @OwaisAhmed Are both Sitecore instances have the same version? Apr 12, 2023 at 5:42

2 Answers 2

3

I do follow this way and it works great for me.

If you want to move the entire site/tenant from 1 environment to another you need to create a Sitecore package.

Refer following steps to create a site package.

  1. Rightclick site/tenant and select -> Srcipt -> Packaging -> start new packaging.

enter image description here

  1. Select Add tree to package and click Add.

enter image description here

  1. Installation option window select the item, that you want to move to another environment along with content and click ok.

enter image description here

  1. Right click again the site and select -> Srcipt -> Packaging -> Download Package.

enter image description here

  1. Download package window will appear and then put the necessary details and click ok.

enter image description here

  1. Once it is completed it will show a download window click on the download button.

enter image description here

Now you can install this package into another environment in the same way using installation wizards.

You can validate the new site in the SXA site manager and change the order to be in an Ok state.

enter image description here

Updated Answer:

Follow these steps to add specific items to the package.

  1. Right-click the item you want to create a package and -> Srcipt -> Packaging -> start new packaging -> Add Item to Package. like here Page 1 click ok.
  2. Repeat the 1st steps to add any other items like your case -> /Settings/Site Grouping and instead of start new packaging select Add Item to Package. So now your package has specific items Page1 and Site Grouping only.

enter image description here

  1. Now you -> Srcipt -> Packaging -> Download Package.

That way you can add required items only without adding a lot of unnecessary items.

Hope it helps!

3
  • 1
    Thanks for the reply Sumit. I checked the way you did it but it is adding a lot of unnecessary items into the package which I do not want to install in my other environment. Is there any other way of doing this? I have also updated my question about how I am copying the sites. Apr 12, 2023 at 4:46
  • Please refer updated answer to creating a package for required items only. Apr 12, 2023 at 5:47
  • thanks alot Sumit Apr 12, 2023 at 5:54
1

As you also mentioned that you created a package that includes Tenant and all it's descendants.

So you can also use this option called "Add Tree to package" while creating the package.

enter image description here

It will allow you to add more options to include Root and decedents and others like the below.

enter image description here

Hope this makes sense. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.