Restore Web Part Gallery

Jerry 21 Reputation points
2020-10-29T07:46:12.317+00:00

I have accidentally deleted the main web part in Web Part Gallery:

When I try to visit "_catalogs/wp" in browser, it shows "Page Not Found".

I would like to ask how to restore the Web Part Gallery?

Thanks a lot.

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

Answer accepted by question author
  1. MichaelHan-MSFT 18,136 Reputation points
    2020-10-30T06:49:46.143+00:00

    Hi @Jerry ,

    How did you delete the Web Part Gallery? Could you please share more details.

    As far as I know, the Web Part Gallery can not be deleted. Maybe you could check the site recycle bin, the items you deleted should be kept in the recycle bin. Maybe you could restore the Web part Gallery there.

    Update:

    Usually, there is a Web Parts link in Site Settings. You could go to the Web Part Gallery through that link.

    36331-image.png

    If you cannot see the Web Parts link, the Web Part Gallery may be deleted. You could create a new Web Part Gallery library with the below command:

    $web=get-spweb http://sp/sites/yoursite  
    $ListTemplate = [Microsoft.Sharepoint.SPListTemplateType]::WebPartCatalog  
    $Web.Lists.Add("webpartgallery","description",$ListTemplate)  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.