There have been a lot of discussions around this topic but there's no working code solution for copying pages with web parts across site collection. Everyone suggest using SP designer. Is there any csom or REST api solution to achieve this? I have tried LimitedWebPartManager class, export/import and creating the web part xml programmatically but none of this works for 2013 On-prem.


I faced a similar problem. Due to timeout I decided to use a PowerShell script, which calls the REST API in my CSOM C# application. Not ideal, but it works.

The script ist from:


  • This script works for copying files within same environment (or within same site collection). I need to copy from On-prem to online site collection. thanks anyways. – Adi S Aug 25 '17 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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