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.

1 Answer 1


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
    Commented Aug 25, 2017 at 13:35

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.