How to make SharePoint site collection read only and restrict delete?

This SharePoint tutorial, we will discuss, how to make SharePoint site collection read-only and restrict delete. By following the same approach, we can make the site collection read-only and restrict delete in SharePoint 2013/2016.

You can apply locks to a site collection to prevent users from updating content or you can temporarily prevent users from accessing the SharePoint site collection.

Make SharePoint site collection read-only and restrict delete

Follow the below steps to make SharePoint site collection read-only and restrict delete.

Open SharePoint 2013/2016 central administrator and click on Application Management. Then Click on “Configure quotas and locks“, a new wizard will be open here.

make sharepoint site collection read only

Select Lock option like below and click on OK.

make sharepoint site read only

Then Open SQL Management studio and connect DB Engine.

sharepoint online make site collection read only

Find out the Database name of the site, Central Administration > Application management > View Site collection and select one site.

sharepoint 2016 make site collection read only

Set SharePoint Content Database in Read-Only Mode, SQL Server Management Studio. Right-click on the database -> Options -> Make database read only -> True.

sharepoint 2013 make site collection read only

Now the SharePoint site will show read-only like below.

make site collection read only sharepoint online

Make a site collection read only in SharePoint

Now, let us see few other approaches to make a SharePoint site collection read-only.

To make a site collection read-only means we are preventing users from adding, updating, or deleting content in the site collection.

You can also make a site collection as Adding content prevented, which means to prevent users from adding new content, also we can make site collection as “No Access” which means to prevent users from accessing the site collection and its content.

We can make a site collection read only by using SharePoint Central Administration, By using PowerShell and by using Server-side object model.

Make a site collection read only from SharePoint Central Administration

Open SharePoint Central Administration then selects Application Management.

From the Application Management screen click on Configure quotas and locks from Site Collection section.

This will open the Site Collection Quotas and Locks screen, Select the Read-Only radio button under the Lock status for this site: section. And then click on OK.

Make a SharePoint site collection read only using PowerShell

First, open SharePoint Management Shell, make sure you are opening in Administrator mode.

Syntax:
Set-SPSite -Identity "<SiteCollection>" -LockState "<State>"

Example:
Set-SPSite -Identity "http://SiteCollectionURL" -LockState "ReadOnly"

Make a SharePoint site collection read only using SharePoint Server Object Model

Below is the SharePoint server object model code to make site collection read-only.

SPSite site = new SPSite("http://SiteCollectionURL");
site.ReadOnly = true;

You may like following SharePoint tutorials:

This is how we can make SharePoint 2013/2016 site collection read-only and restrict delete.

Tags: sharepoint 2013 make site read-only, sharepoint 2013 make site collection read-only, how to make a sharepoint site read only, sharepoint 2016 make site read only

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>