Problem Statement
This article is a continuation of my previous article, Duplicate the Client Side Pages into same Modern SharePoint Online Library Folder where I explained how to duplicate the client side page with all existing controls.
In this article, I would like to explain this: If the user makes any changes to duplicate page, how to publish the duplicate client side pages to the original page into same site pages library within the same site collection.
As a developer, we have a couple of options to duplicate the page into another modern site collection library or different folder strucutre, but there is no way to copy the pages within the same modern site collection sites library within the same folder structure.
Prerequisite Steps
Let's create a page and add exisitng below control, or user can add any other available controls. This is just for demo purposes.
- SharePoint Online PnP PowerShell Overview here
- Browse the exisitng pages
Home Page looks like this,

Duplicate Page looks like this with changes,
- Add new control
- Modify the pages control layout

Approach Overview
Key steps to publish duplicate client side page with changes to original Modern Site Collection Site Pages into Same Library Folder.
- Use PnP Online to connect to SharePoint Online Modern Site
- Export PnP Client Side Pages Command export pages with PnP Provisioning Template
- Store it locally.
- Apply PnP Provisioning Template store it with different name.




Join the conversation! Your thoughts help the community grow.