Convert classic page to modern page

SharePointer 1 Reputation point
2021-01-28T23:26:19.567+00:00

I have been trying to solve this problem. There are some pages (like 50) to be migrated from classic to modern experience. The pages are in "Pages Library" in classic SharePoint. The modern view uses "Site Pages" and the content types are different too. Is there a way to modernize these 50 pages using a script? I found an article that suggests that this could be done.
https://learn.microsoft.com/en-us/sharepoint/dev/transform/modernize-userinterface-site-pages

The script works when I try to convert pages in "Site Pages" but not on the "Pages library". The article says that the script supports converting publishing pages to modern pages but couldn't get that working. Did anyone try it before?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,975 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. trevorseward 11,711 Reputation points
    2021-01-28T23:46:39.47+00:00

    There's no "good" solution, even this one. Generally the strategy for 'migrating' classic to modern pages is to rebuild them from scratch as there are far too many differences between the two and no good automated migration path.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.