Forum Discussion
Thao Pham-Aaltonen
Sep 19, 2018Brass Contributor
Copy or Move Site Page from one site to another
Hello, I've been searching to see if this is possible but it appears with the modern experience, you can only copy a site page to the same Site Pages library in the same site. If I switch my view to...
henriqueserafim
Sep 20, 2024Copper Contributor
Thao Pham-Aaltonen I know this thread is a bit old and still people struggle finding a easy way to do a simple task. Maybe you can try an extension developed by Torpedo that allows you to do that task in SharePoint Online with a few clicks. It has a 3 day trial for you to do the job. Copy Page to Site
- deanshepherdSep 20, 2024Brass ContributorI have allways used this simple powershell to move\copy pages between sites. Wish the copy to button would allow you to move pages across sites that you are an owner of simalar to documents ... sey lah vee, maybe next year
#Parameters, set the source site, set the destination site set the page name
$SourceSiteURL = "https://tenant.sharepoint.com/sites/mysourcesite"
$DestinationSiteURL = "https://tenant.sharepoint.com/sites/mydestinationsite"
$PageName = "mypage.aspx"
#Connect to Source Site
Connect-PnPOnline -Url $SourceSiteURL -Interactive
#Export the Source page
$TempFile = [System.IO.Path]::GetTempFileName()
Export-PnPPage -Force -Identity $PageName -Out $TempFile
#Import the page to the destination site
Connect-PnPOnline -Url $DestinationSiteURL -Interactive
Invoke-PnPSiteTemplate -Path $TempFile- henriqueserafimSep 20, 2024Copper ContributorThat is another approach yes and it does the job. The idea of this extension is to allow a worries free about having to change/adapt the code for different tenants, pages, sites,webs. You can do it using powershell, power automate, old/legacy sharepoint features or using the extension. Just another option to be added with pros and cons obviously. But nice and cute little piece of code you have there 😉