Change SharePoint Site To Read Only

This article will help you in making your sites read-only which is mostly required during your SharePoint migration.

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

Steps to make SharePoint site read-only.

Central Administration

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

    SharePoint

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

    SharePoint
  1. Now, browse the site collection and we can see a message on the top saying, “This site is read-only at the farm administrator’s request”.

    SharePoint 
  1. Go to any document library or list. The options 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 

Database

  1. Select the content database and go to its Properties.

    SharePoint 
  1. Click on Options menu from the left-hand side of the window and under the "State" section, set “Database Read-Only” to “True”, as shown in the image below.

    SharePoint 
  1. Now, the content database is in read-only mode.

    SharePoint 
  1. Browse any site collection that exists in the content database and you will see a message on the top that says, “We apologize for any inconvenience but we’ve made the site read-only while we are making some improvements”.

    SharePoint 
  1. Go to any document library or list. Options 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

PowerShell method

  1. Add - PSSnapin "Microsoft.sharepoint.powershell"  
  2. #Get the Web Application  
  3. $WebApp = Get - SPWebApplication "https://C-SharpCorner.com"  
  4. #Loop through all site collections and Set read only status  
  5. foreach($SPsite in $webApp.Sites)   
  6. {  
  7.     $SPsite.ReadOnly = $true# Or you can use: Set - SPSiteAdministration - LockState "Unlock" - Identity $SPsite.url  
  8. }  

Hope this helps. Happy SharePointing 😊