As your organization evolves, some SharePoint sites become inactive. Maybe a project is completed, a team restructured, or content is no longer actively usedβbut still holds value. Instead of deleting these sites, itβs smarter to archive them.
In this blog, weβll walk through:
β
What is meant by archiving a SharePoint site
β
Step-by-step demo to archive a site using PowerShell
β
What happens after a site is archived
β
Best practices and recommendations
β
Hands-on lab you can try
π What Does Archiving a SharePoint Site Mean?
SharePoint Online does not have a built-in “archive” button, but we can effectively archive a site by:
- Making the site read-only
- Preventing any edits, uploads, or deletions
- Optionally hiding it from navigation and search
- Applying retention policies via Microsoft Purview
- Moving key documents to a long-term storage site (optional)
The goal of archiving is to preserve the site and its content without allowing further changes.
π§ When Should You Archive a SharePoint Site?
You should consider archiving a site if:
- The project is completed (e.g., βERP Migration 2024β)
- The team is disbanded or restructured
- No updates have occurred in the last 6β12 months
- You need to retain historical data for audit or compliance
- You’re decluttering your SharePoint structure
π οΈ DEMO: Archive a SharePoint Site by Making It Read-Only
Weβll use PowerShell to make the site read-only, which is the most common and effective way to archive.
β Step 1: Identify the Site
Go to the SharePoint Admin Center:
- Navigate to Active Sites
- Search for the site you want to archive
- Copy the full site URL (e.g.,
https://yourtenant.sharepoint.com/sites/Team-Site/finance-project
)

β Step 2: Connect to SharePoint Online via PowerShell
If not already installed, install the module:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Import-Module Microsoft.Online.SharePoint.PowerShell

Then connect to your tenant:
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com


β Step 3: Lock the Site to Read-Only Mode
Set-SPOSite -Identity https://50xfwy.sharepoint.com/sites/Team-Site/finance-project -LockState ReadOnly

I got error, because Subsite cannot archive only site collections can be archived. So, I am archiving parent site.
π Verify the lock state:
Get-SPOSite -Identity "https://50xfwy.sharepoint.com/sites/Team-Site" | Select LockState

For Revert back or Unlock the site:
You can unlock it with the following PowerShell command:
Set-SPOSite -Identity "https://50xfwy.sharepoint.com/sites/Team-Site" -LockState Unlock
Get-SPOSite -Identity "https://50xfwy.sharepoint.com/sites/Team-Site" | Select LockState

β This command restores full read/write access to the site.
π What Happens to an Archived SharePoint Site?
Once the site is archived (read-only), hereβs what changes:
Feature | Behavior After Archiving |
---|---|
View Content | β Users can still view and download files |
Edit/Upload/Delete | β Not allowed |
Create Pages or Posts | β Blocked |
Permission Changes | β Not possible unless unlocked |
Searchable | β Still appears in search results (unless hidden) |
Navigation | β οΈ Recommended to remove from menus |
Restore/Edit | β Site can be unlocked anytime via PowerShell |
Example Message Users May See:
βThis site is read-only at the moment. Contact your administrator for more information.β

I noticed, Subsite also in lockstate.
π¦ Optional: Move Content to an Archive Library
Instead of keeping full sites, some organizations prefer to move selected files to a centralized Archive Center.
Ways to do this:
- Microsoft Power Automate: Automatically move files older than X days
- PnP PowerShell: Migrate libraries or lists to another site
- Download manually for small-scale archiving
π§ͺ Hands-On Lab Exercise
π§ Task: Archive the “HR Hiring Portal” site and validate read-only behavior.
Steps:
- Find and copy the site URL from SharePoint Admin Center
- Connect via PowerShell
- Run the
Set-SPOSite
command withReadOnly
lock - Remove it from hub navigation
- Try editing as a user to confirm the archive status
π Conclusion
Archiving SharePoint sites is a crucial step in managing digital sprawl and ensuring compliance. Whether youβre wrapping up projects or simply organizing your environment, read-only archiving keeps data safe, clean, and accessible.
Remember: Archived β Deleted. You can unlock it anytime!