Migrate Existing Power Pages Websites to Bootstrap 5

Migrate Existing Power Pages Websites to Bootstrap 5

Microsoft Power Pages now supports Bootstrap 5, providing improved responsiveness, modern UI capabilities, enhanced accessibility, and better performance. Existing websites built on Bootstrap 3 can be migrated using the Microsoft Power Platform CLI migration tools.

Why Upgrade to Bootstrap 5?

Bootstrap 5 introduces significant improvements over Bootstrap 3, including modern components, improved grid systems, reduced dependencies, and enhanced mobile responsiveness.

Prerequisites

Before starting the migration process, ensure the following requirements are completed:

Download the Website Folder

Use the Power Platform CLI to download the existing website before migration.

Step 1: Authenticate

pac auth create -u [Dataverse URL]

Step 2: List Available Sites

pac pages list

Note the Website ID of the site you want to migrate.

Step 3: Download the Website

pac pages download --path [PATH] -id [WebSiteId]

This command downloads all website metadata and files into the specified local folder.

Run the Bootstrap Migration Tool

After downloading the website, execute the Bootstrap migration command.

pac pages bootstrap-migrate -p "WebsiteFolderPath"

The migration tool creates a new folder containing the Bootstrap 5 version of the website.

Tip: Keep the original Bootstrap 3 version unchanged so you can compare both versions during testing.

Review Migration Changes

After the migration completes, review all generated changes before deployment.

  1. Open the Bootstrap 5 folder in Visual Studio Code.
  2. Open the Command Palette using Ctrl + Shift + P.
  3. Run the Bootstrap Diff command.
  4. Review highlighted differences between Bootstrap 3 and Bootstrap 5 files.
  5. Validate custom CSS and JavaScript compatibility.

Upload the Migrated Website

Once validation is complete, upload the migrated Bootstrap 5 website.

pac pages upload --path [Folder-location]

Example:

pac pages upload --path C:\pac-portals\downloads\custom-portal\

After the upload completes, the website will run using Bootstrap 5 components and styling.

Validate the Migration

Compare the migrated Bootstrap 5 website against the original Bootstrap 3 version.

Clear Website Cache

After uploading the migrated website, clear the Power Pages cache to ensure the latest files are loaded.

Bootstrap 3 vs Bootstrap 5

Feature Bootstrap 3 Bootstrap 5
Grid System Legacy Enhanced
Mobile Support Basic Advanced
jQuery Dependency Required Removed
Accessibility Limited Improved
Components Older Components Modern Components

Best Practices

Summary

Migrating Power Pages websites to Bootstrap 5 provides improved performance, responsiveness, accessibility, and modern UI capabilities. By using the Power Platform CLI migration tools and following best practices, organizations can successfully modernize their websites while minimizing risks during the upgrade process.