When to Enable Lightning Web Security
Use this table to determine whether to enable Lightning Web Security in your production org, based on the type of components present in your org.
New orgs have Lightning Web Security enabled by default. If you plan to populate a new org with pre-existing or packaged Lightning web components, be sure to test first in a sandbox environment with LWS enabled. For more information, see Workflow to Try Your LWCs with Lightning Web Security.
If Experience Cloud is used in your org, see Experience Builder Sites and LWS before enabling LWS.
To determine the type of components that are present in your org, see Which Components Are Supported by Lightning Web Security.
Components in Org | OK to Enable LWS in Production? | Testing Approach |
---|---|---|
No components | Yes | Testing isn’t needed because LWS has no effect if there are no components in your org. However, testing a new release is always recommended in sandbox orgs. |
LWC only | Yes, after testing in sandbox | We strongly recommend that you try Lightning Web Security in a sandbox staging environment for your org first. See Workflow to Try Your LWCs with Lightning Web Security.
|
Aura and LWC | Yes, after testing in sandbox | We strongly recommend that you try Lightning Web Security in a sandbox staging environment for your org first. See Workflow to Try Your LWCs with Lightning Web Security.
|
Aura only | Yes, after testing in sandbox | We strongly recommend that you try Lightning Web Security in a sandbox staging environment for your org first. See Workflow to Try Your LWCs with Lightning Web Security.
|