How to Delete a SharePoint Site and Restore it Back? Explored

Stephen King ~ Modified: November 29th, 2024 ~ Migration, SharePoint ~ 10 Minutes Reading

Creating a site is a bit too easy in SharePoint, that’s why sometimes users are unintentionally creating two or more sites with the same name or maybe creating a site to test the workings. Therefore, many copies of sites and unnecessary sites are there in SharePoint which makes it a bit complex to access the necessary sites or maybe leads to misconception. That is why clean (unnecessary files excluded) SharePoint is preferred by most Users and Organizations. That led to the deletion of the SharePoint sites but, this is more complex than it looks. So, the question “how to delete a SharePoint site” can arise in many minds. For instance,

how to delete a sharepoint site

In this write-up, we will describe methods to delete SharePoint sites or how we can restore a deleted SharePoint site in detail. However, we will also discuss how you can delete and restore the SharePoint site using PowerShell and classic or modern sites. So, let’s get started.

What is a SharePoint Site?

A SharePoint site is a collaborative workspace you can access through a web browser. In SharePoint, an admin can create a site where users who are added to this site can share files, make updates, and assign tasks.

To understand how to delete a SharePoint site you should know how to create it.

Let’s see how to Create a SharePoint site in Office 365 here are steps to create it for SharePoint Online –

Step 1. Firstly, log in to your Microsoft 365 account and go to the SharePoint homepage.

Step 2. Now you will see a “+” button for Creating a site. Click on that add button to start the process.

Create sharepoint site

Step 3. Secondly, choose the type of site there are two main types of sites Team site and communication site.

Choose site

Step 4. Now enter details of your site name and description. You can also set privacy to your site.

Step 5. Add members to the site or invite members through mail.

Step 6. Click on finish and you have successfully created a SharePoint site.

How to Delete a SharePoint Site?

There are many methods to delete SharePoint Online sites. Which includes SharePoint Admin Center and PowerShell. Using any of the method, you can delete SharePoint sites. Let’s go deeper into the both methods so that you can get a crystal clear view of all approaches. 

Delete SharePoint Site Using Admin Center

Before going to delete SharePoint site using Admin Center, do not forget to make sure you have the admin credentials. Also, ensure that the site is going to be deleted is no longer required.

Step 1. Firstly, log in to the SharePoint Admin Center as a global administrator and if you are not a global admin then connect to global admin to do this task.

Step 2. Secondly, click on Sites, and after that click on Active Sites placed left. 

Step 3. After that, choose a site you want to delete from the site collection list. 

Step 4. Click on the delete button placed in the toolbar, and again click the delete button when prompted!

Step 5. If you want to delete the sites in bulk then you can select the check box before the site name in the active list. Then click on Bulk edit placed in the toolbar, a drop-down bar will open, and select delete.

After this, you are not able to see deleted sites in the active list. However, the deleted files are stored in the SharePoint Online recycle bin and deleted permanently after 93 days. If you have deleted SharePoint groups then their data is stored in the Azure AD recycle bin for 30 days. Let’s discuss how to delete a SharePoint site for modern sites and classic sites. 

Delete SharePoint Modern Site

You should have admin access to SharePoint or have site collection rights to perform the given steps: 

Step 1. Open the SharePoint site you want to delete and click on the settings icon.

go to your site

Step 2. After that select Site information from the upper menu

Select site information

Step 3. Now in the site information panel click on the link named “delete site”.

Delete SharePoint site

Step 4. After that, a prompt is popped for deletion confirmation, Click on the Delete button.

Prompt to delete a SharePoint site

The deleted item will remain in the recycle bin for 93 days admin can empty the recycle bin.

Delete Classic SharePoint Site

Follow these steps carefully

  • Step 1. Go to your SharePoint site
  • Step 2. Click on the settings icon
  • Step 3. On the site settings, under site actions click on the Delete this site.  

Now a question can be asked – How to delete SharePoint sites in bulk? To do this follow this step. Select multiple sites and click on bulk edit placed in the toolbar >> Now click on delete in the drop-down.

How to Delete a SharePoint Site Using PnP PowerShell?

To perform deletion through PowerShell admin should have expertise in it. Because a single mistake can lead to a data loss situation. Run these commands in your PowerShell:

Import-Module Microsoft.Online.Sharepoint.PowerShell
#enter details for processing
$AdminSiteURL = "Your SharePoint  site URL”
$AdminName = "enter you admin name"
$SiteCollURL = "Provide site collection URL"
#commands to connect PnP
$SecurePWD = ConvertTo-SecureString "Password" -asplaintext -force 
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $AdminName, $SecurePWD
#command to connect SharePoint Online
Connect-SPOService -url $AdminSiteURL -credential $Credential
#command to delete SharePoint Online site collection
Remove-SPOSite -Identity $SiteCollURL -NoWait -Confirm:$false
Write-Host "Woohoo! Your Site Has Been Deleted!"

After performing these steps you get your answers regarding how to delete a SharePoint site.

Sometimes excessive sites are created in SharePoint to check the working of a particular function or to organize events. In this case, the admin may need to delete the unused or older SharePoint site for ease in the management of the site. But what if he deleted the wrong SharePoint and now needs to restore the deleted SharePoint site in Office 365 using PowerShell? let’s see how we can recover the deleted site.

Restore a Deleted SharePoint Site in Office 365

After learning how to delete a SharePoint Site, let’s see how we can restore the deleted SharePoint site if it is deleted accidentally. To restore the SharePoint site the admin should have Knowledge about the Modern site and the Classic sites in SharePoint. The restoring methods of PowerShell for both are different from the manual ways.

First of all an admin should know the manual ways to restore the modern and classic site. Let’s understand the manual method to restore deleted SharePoint sites in Office 365 PowerShell then we will move to PowerShell commands to do this.

Site collection: A site collection is a folder where all the sites you have created are stored and after deletion of the site it can be restored from site collection because it will be there for 93 days after deletion after that you can’t restore it.

Steps for Modern Sites: Restore Deleted Files

  • Go to the SharePoint Admin Center and click on the Expand icon to see Sites.
  • Now click on Deleted Sites in the SharePoint Admin Center.
  • Go to the recycle bin page where all your deleted site is stored. 
  • Select the site that you want to restore then in the below bar you can see a Restore button click on that button.
  • You will get notified about the site being restored.

Steps for Classic Sites: Restore Deleted Files

Let’s see the steps to restore deleted files for the classic SharePoint site.

  • Go to the classic SharePoint Admin Center
  • Now in the left navigation click on the Site Collection.
  • Now click on recycle bin >> Go to the site collection. 
  • Click on the site in the site collection you want to restore.
  • Click on Restore deleted item.
  • You will be notified with a Restored Message.

After performing this, you can restore deleted SharePoint using the manual method. To restore deleted SharePoint sites in Office 365 PowerShell, follow the steps below. 

Steps to Restore Deleted SharePoint Site in Office 365 Using PowerShell

SharePoint site collection is deleted after 93 days. However, using PowerShell, you can recover the deleted site before the retention period. Restoring the SharePoint site using PowerShell is a bit easy for an admin. Follow these steps to Restore deleted sites.

Step 1: Establish a connection to SharePoint Online.

Try to run the below command in SharePoint Management Shell 

#Configure connection param.
$AdminSiteURL="https://crescent-admin.sharepoint.com"
#get the tenant credentials to connect
$Cred = Get-Credential
#command to establish a connection to admin of SharePoint Online tenant 
Connect-SPOService -URL $AdminSiteURL -Credential $Cred

Step 2: Command to show the list of all deleted sites.

Execute this command to get the deleted sites

#list of deleted sites
Get-SPODeletedSite

This command Check if the site is available for restoration.

Step 3: Command for restoration of site collection.

After that, execute this command to restore the deleted site:

#restore deleted SharePoint sites in Office 365 PowerShell
Restore-SPODeletedSite -Identity "Your Deleted site Url"

woohoo! you have successfully learned how to restore deleted SharePoint sites in Office 365 PowerShell.

If you reached this section, means now you are aware of the process of how to delete a SharePoint site and how to restore it. As we have mentioned above, the deleted SharePoint sites can be restored within 93 days. But have you ever thought? If the SharePoint sites also get deleted from the recycle bin and now you want it back. What will you do?

Don’t fret because it already occurred with many SharePoint administrators earlier. So, if you do not want to face the issue then use the Expert’s Handpicked SharePoint Online Migration Tool. This tool can help you to move your SharePoint data to another account as a backup. Which you can access later even after the data gets deleted from your current account. You can achieve it by executing the below quick steps only.

Download Now Purchase Now

  1. Download and Activate the tool.
  2. Select the essential Source & Destination platforms.
  3. Hit the option of Sites and also filter them according to date if necessary.
  4. Validate both platforms after providing their account credentials.
  5. Add User and Sites in the tool that are going to be stored on the other account.
  6. Finally, just start the migration process. 
Conclusion

Deletion of SharePoint site is an easy method and can be accomplished in minutes but you have to be very careful while deleting SharePoint sites. In this write-up, we have mentioned how to delete a SharePoint site and how to restore deleted SharePoint sites in Office 365. However, we have also discussed the manual and cmdlet steps to delete and restore the SharePoint site. Hopping! After reading this blog, all your queries about the deletion of the SharePoint site are answered.