Migrate website configuration
Power Pages website development involves several configurations and customizations to achieve a desired experience for website end users.
After you have completed development or configuration of your website instance, you might want to migrate your latest website configuration from development to testing or the production environments.
Migration involves exporting the existing configuration from the source Microsoft Dataverse environment, and then importing it into the target Dataverse environment.
Prepare the target environment
Note
- Preparing the target environment is a one-time process. You will need to provision a new website in order to install the managed Power Pages solutions on Dataverse as well as configure the Power Pages web application. The process also installs default website metadata which will be replaced with the website metadata from your source environment.
- Ensure that the target environment's maximum attachment size is set to the same or greater size as your source environment.
- The maximum size of files is determined by the Maximum file size setting in the system settings email tab in the environment system settings dialog box.
Provision a new website in your target environment. Use the same website template as you provisioned on your source environment. For example, if you provisioned a site using the Dynamics 365 Customer Self-Service template on your source environment, provision the site using the Dynamics 365 Customer Self-Service template on your target environment.
On the target environment, using the Portal Management app, delete the newly created website record. This will remove the default website configuration data from the target environment.
On the target environment, in Power Apps, delete the portal app. This will remove the website currently configured to render the default site.
Note
Do not delete the Portal Management app!
Transfer the site metadata from the source environment using the Power Platform CLI or the Configuration Migration Tool.
On the target environment, using Power Apps, provision a new website using the existing website option. This process will configure a website using the site configuration you transferred from the source environment.
Note
The ability to create a site using the existing website option is only currently available in Power Apps.
The website updates from the source environment should be reflected in this new target environment. Going forward, you should be able to transfer configuration from your source to target environments by transferring the website configuration data.
Transfer website metadata
Transfer website configuration using Power Platform CLI
The Microsoft Power Platform CLI provides many features specifically for Power Pages. These commands allow you to download site configuration from a source environment and transfer it to a target environment. These commands can also be incorporated into your ALM processes.
Create Power Platform CLI authentication profiles to connect to both your source and target environments. You can give them a name to easily identify the target and source environments.
pac auth create --name [name] --url [environment url]
Example
pac auth create --name PORTALDEV --url https://contoso-org.crm.dynamics.com
When the authentication profiles are created, they'll have an associated index that can be determined using the list command.
pac auth list
Select the Power Platform CLI authentication profile connected to the source environment.
pac auth select --index [source environment index]
Example
pac auth select --index 1
Determine the website ID for the source site.
pac paportal list
Download the website configuration data to your local workstation. Use the --overwrite option set to true if you have previous downloaded website configuration to the same path.
pac paportal download --path [path] --webSiteId [website id]
Example
pac paportal download --path c:\paportals\ --webSiteId db9db518-ea5c-ec11-8f8f-00224804e6cd
Select the Power Platform CLI authentication profile connected to the target environment.
pac auth select --index [target environment index]
Example
pac auth select --index 2
Upload the website configuration data to the target environment.
pac paportal upload --path [path]
Example
pac paportal upload --path "C:\paportals\portaldev"
Note
- The Power Platform CLI tool does not migrate Dataverse tables or table schema. Migration may fail with missing elements such as tables and fields when configuration data is mismatched with selected schema.
- During import, ensure the destination environment contains the same website template type already installed with any additional customizations such as tables, fields, forms or views imported separately as solutions.
Create new website using migrated data
If the migration process is updating an existing website, the updates should now be visible in the target environment. If the migration is for a new website, you can now create the new website using Power Apps for the imported website record by using the option Use data from existing website record. More information: Create portal
Note
You currently can only create websites using existing website records from within Power Apps.
Tenant-to-tenant migration
PowerPages doesn't support tenant-to-tenant migration. To migrate a website from one tenant to another, you must follow these steps:
Reset your website in the source tenant.
Provision a new website in an environment.
Migrate website configurations and customizations using the steps explained in this article earlier.
See also
- Power Pages support for Microsoft Power Platform CLI.
- Tenant-to-tenant migration of a Power Platform environment.
- Tenant-to-tenant migration of model-driven apps in Dynamics 365 such as Sales, Customer Service, Marketing, Field Service, and Project Service Automation.
Feedback
Submit and view feedback for