Page performance matters when people use an online store or a self-service portal. A slow product page can interrupt the buying process, while delays in a customer portal make everyday tasks more difficult.

Salesforce Lightning Web Runtime (LWR) provides a way to build Experience Cloud sites and ecommerce storefronts using Lightning Web Components. Its architecture is designed to deliver pages efficiently, support custom development, and reduce the amount of work required when visitors load a site.

For new Salesforce B2B Commerce storefronts, LWR is the recommended architecture. It is also an option for Experience Cloud websites, customer portals, and microsites.

This article explains how LWR works, how it compares with Aura, and what to consider when building a new site or migrating an existing one.

What is Lightning Web Runtime (LWR) in Salesforce? 

Lightning Web Runtime (LWR) is a web application runtime used to build and deliver digital experiences with Lightning Web Components (LWC).

In Salesforce Experience Cloud, LWR powers site templates such as Build Your Own (LWR) and Microsite (LWR). Developers can create custom components using HTML, JavaScript, and CSS, then add them to pages through Experience Builder.

The runtime handles how those components are delivered and rendered in the browser. It also supports an architecture that separates cacheable interface resources from data retrieved dynamically from Salesforce. LWR-based Experience Cloud templates use Lightning Web Components rather than Aura components.

This distinction is important because Salesforce also supports other front-end technologies. For example, Salesforce Multi-Framework lets developers to build applications with React and Angular, but it is a separate development model from standard LWR-based Experience Cloud templates.

Developers familiar with Lightning Web Components can therefore use their existing Salesforce skills while taking advantage of LWR’s publishing and performance features.

For technical details, see the official Salesforce LWR documentation.

Why is LWR faster than Aura?

One of the main differences between LWR and Aura is how they deliver components to the browser. In Aura-based Experience Cloud sites, Lightning components are delivered dynamically. This means the site retrieves component resources as pages load.

LWR takes a different approach. When an LWR site is published, the framework and user interface resources are prepared so they can be served as static, cacheable content. Salesforce can deliver these resources through its content delivery network (CDN), reducing the need to retrieve them from the original server for every request.

This can speed up page loads, especially when the same resources are requested repeatedly. The business data remains dynamic. For example, a B2B storefront can retrieve product details, account-specific prices, and order information from Salesforce. How quickly updated data appears depends on the application’s data retrieval and caching configuration.

Salesforce describes sub-second content delivery and page loads as a capability of LWR. However, this isn’t a guarantee for every site. Large images, inefficient components, external integrations, and unnecessary API requests can still affect performance.

The practical benefit is that LWR provides a more efficient foundation for delivering the site, while developers remain responsible for making the application itself perform well.

LWR vs Aura: what are the main differences?

Both Aura and LWR support Salesforce Experience Cloud sites, but they differ in component support, publishing, and available features.

Area Aura LWR 
Components Aura components and LWC LWC in standard Experience Cloud templates 
Page delivery Components served dynamically Published components served as cacheable resources 
Code changes Component updates generally don’t require republishing Component updates require republishing 
Templates Broader selection of established templates Lightweight templates focused on LWC 
Customisation Aura and LWC development models LWC-based customisation 
Existing components Supports Aura and LWC Existing LWCs may be reusable; Aura components must be replaced 

The publishing process is particularly important. When developers change a component used on an Aura site, the updated code can become available without republishing the site. With LWR, changes to standard, custom, or managed-package components require the site to be republished.

This doesn’t mean administrators must republish whenever a Salesforce record changes. Record updates are separate from the published component code, although caching may affect when users see the latest information.

LWR also has limitations that need to be considered. Some Experience Cloud features and components available in Aura templates aren’t supported in LWR templates. Salesforce maintains a current list of LWR template limitations.

When should you choose LWR?

For a new Salesforce B2B Commerce storefront, LWR is the recommended starting point. Salesforce’s commerce documentation also recommends considering migration for existing Aura-based B2B storefronts.

LWR is suitable for many custom Experience Cloud sites, especially when the project requires flexible page development and good loading performance.

For example, a manufacturer building a new distributor portal may need product information, account-specific pricing, and order management. LWR provides the storefront architecture, while Salesforce commerce components and APIs support the required business processes.

However, LWR isn’t automatically the best option for every existing Experience Cloud implementation. An organisation may already have a stable Aura portal with custom components and features that aren’t available in an equivalent LWR template. In that case, migration needs to be justified by the expected improvements and the work required to replace unsupported functionality.

The decision should begin with the site’s requirements rather than performance claims alone.

How to build or migrate an Experience Cloud site to LWR

The work depends on whether you’re starting with a new site or moving from an existing Aura implementation. 

Building a new LWR site

Start by selecting an appropriate Experience Cloud template. For a custom site, Salesforce provides Build Your Own (LWR) and Microsite (LWR), while B2B Commerce has its own storefront templates.

The next step is to define the pages, components, and data the site needs. Standard components may cover some requirements, while others will need custom Lightning Web Components.

For example, a customer portal might need a component that displays the user’s open cases. Developers can retrieve the relevant Salesforce data using supported APIs and display it through a custom LWC.

Once development is complete, test the site with realistic user scenarios. Review navigation, permissions, data access, mobile responsiveness, and loading performance before publishing. The broader delivery process follows the principles described in our Salesforce implementation guide.

Migrating an Aura site to LWR

An Aura-to-LWR migration begins with an assessment of the existing site. Review the components currently in use and identify which ones can work with LWR. This distinction can significantly affect the development effort.

Many Lightning Web Components developed for Aura-based sites can be reused without modification or with relatively small changes. Aura components, however, need to be replaced with Lightning Web Components or redesigned.

For B2B Commerce storefronts, the work may also involve changes to navigation, component metadata, styling, and store configuration. The safest approach is to review these dependencies before rebuilding pages. This helps developers understand what they can reuse and where the implementation needs to change.

Salesforce provides an official B2B Commerce Aura-to-LWR migration guide with more technical detail.

If your store still uses CloudCraze, the migration is different. CloudCraze relies on an older commerce architecture, so moving to modern B2B Commerce may also require changes to the data model, custom business logic, and integrations. Our guide on moving off CloudCraze to Salesforce B2B Commerce covers those considerations separately.

Lightning Web Runtime implementation example

How to measure LWR site performance

LWR is designed to support fast page delivery, but you should still measure the results. Consider a B2B storefront where the main page loads quickly, but product prices take several seconds to appear. The delay may come from an external pricing service rather than the LWR runtime itself.

In this situation, changing the storefront framework won’t necessarily solve the underlying problem. The team needs to review the requests being made, how the data is retrieved, and whether the integration can be improved.

Tools such as Google Lighthouse and WebPageTest can help identify performance issues. Core Web Vitals provide additional measures of loading speed, responsiveness, and visual stability. For an existing Aura site, establish a performance baseline before migration. Then measure the equivalent pages and user journeys after moving to LWR.

This allows you to evaluate the results using actual measurements rather than relying only on the expected benefits of the technology. Salesforce provides additional guidance in its Commerce LWR storefront performance best practices.

Is Lightning Web Runtime the right choice for your Salesforce site?

Lightning Web Runtime provides a modern architecture for Experience Cloud sites and B2B Commerce storefronts. Its approach to publishing and caching can improve page delivery efficiency, while Lightning Web Components support reusable and custom functionality.

For new B2B Commerce storefronts, LWR is the recommended Salesforce approach. For existing Aura sites, the decision depends on the current components, available features, migration effort, and expected improvements.

Before starting a migration, assess how the existing site works, identify what can be reused, and confirm which changes will deliver value to users. If you’re planning a new storefront or reviewing an existing Experience Cloud implementation, explore our Salesforce services to see how Spyrosoft can help with architecture, development, and migration planning.

For ongoing maintenance and improvements, our Salesforce managed services can support the platform after launch.

FAQ

Lightning Web Runtime is a technology used to build and deliver web applications with Lightning Web Components. In Salesforce Experience Cloud, it powers modern site templates designed for efficient page loading and custom development. LWR separates cacheable interface resources from dynamically retrieved business data, helping applications remain responsive while displaying information from Salesforce.

The main differences are component support, page delivery, and publishing. Aura-based Experience Cloud sites support Aura components and Lightning Web Components, while standard LWR templates use LWC. LWR also serves published components as cacheable resources. Unlike Aura sites, LWR sites generally require republishing when component code changes.

LWR is designed to improve loading performance through its publishing and caching architecture. However, a particular site’s speed depends on its components, images, integrations, and data requests. Developers should measure performance before and after migration to establish whether LWR delivers the expected improvements for their implementation.

Yes. Many existing Lightning Web Components can run on LWR without changes or with relatively small adjustments. Aura components must be replaced or converted because standard LWR-based Experience Cloud templates don’t support them. The migration may also require updates to navigation, metadata, data access, and site configuration.

Standard LWR-based Experience Cloud templates use Lightning Web Components. React and Angular aren’t direct replacements for LWC within those templates. However, Salesforce Multi-Framework separately supports applications built with React and Angular. The correct development approach depends on whether you’re building an LWR Experience Cloud site or another type of Salesforce application.