How to make SharePoint site read only?

In this SharePoint 2016 tutorial, we will discuss how we can make SharePoint site to readonly using PowerShell, through the browser and from sql server database. It will help you out on making your SharePoint sites read only which is mostly required during your SharePoint migration.

These steps have been tested on SharePoint 2016, SharePoint 2013, and SharePoint 2010 also We have 3 options and we will cover each one. So, let’s get started.

We can make the SharePoint site read only by following any of the below approaches:

  • From SharePoint 2016 Central Administration
  • From SQL Server Database
  • By using PowerShell

Steps to make SharePoint site read-only.

Make SharePoint 2016 Site Read Only From Central Administration

1. Go to Central Admin > Application Management > Configure quota and locks

sharepoint online make site read only
sharepoint online make site read only

2. Select the site collection which should be read-only and select the “Read Only”. Click OK

make sharepoint 2013 site read only
make sharepoint 2013 site read only

3. Now browse the site collection and we can see on the top a message that says, “This site is read only at the farm administrator’s request”

set sharepoint online site to read only
set sharepoint online site to read only

4. Go to any document library or list. Option like New document, Upload document, New Folder, Edit document, Check out or in, Delete document or edit properties will be disabled. The user can only view the document or download a copy of it.

sharepoint online lockstate
sharepoint online lockstate

Make SharePoint 2016 Site Read Only from SQL Server Database

1. Select the content database and go to properties.

how to make sharepoint online site read only
how to make sharepoint online site read only

2. Click on Option on left hand side of the window and under state change “Database read only” to “True”

how to make sharepoint 2016 site read only
how to make sharepoint 2016 site read only

3. Now the content database is in read only mode.

how to make sharepoint 2013 site read only
how to make sharepoint 2013 site read only

4. Now browse any site collection which exists in that content database and we can see on the top a message that says, “We apologize for any inconvenience but we’ve made the site read only while we are making some improvements”

sharepoint 2013 site read only mode
sharepoint 2013 site read only mode

5. Go to any document library or list. Option like New document, Upload document, New Folder, edit document, check out or in, delete document or edit properties will be disabled. The users can only view the document or download a copy of it.

sharepoint 2016 site read only mode
sharepoint 2016 site read only mode

Make SharePoint 2016 Site Read Only PowerShell

Below is the PowerShell to make the SharePoint 2016 site read-only.

Add-PSSnapin “Microsoft.sharepoint.powershell”
# Get the Web Application
$WebApp=Get-SPWebApplication “https://mySiteURL.com”
#Loop through all site collections and Set read only status
foreach ($SPsite in $webApp.Sites){
$SPsite.ReadOnly = $true #Or you can use: Set-SPSiteAdministration -LockState “Unlock” -Identity $SPsite.url
}

This is how we can make a SharePoint 2016 site read only.

You may like following SharePoint 2016 tutorials:

>