Content and script editor web parts missing in SharePoint

Missing two of your favorite web parts? Don’t fret.

Make sure the site collection feature “SharePoint Server Publishing Infrastructure” is activated

Make sure the site feature “SharePoint Server Publishing” is activated

Still not there? Check “Settings” in the admin center to see if custom scripts are allowed on personal and self-service created sites (allow both). This can take up to 24 hours to take effect.

If you can’t wait (and you’re using SharePoint Online), use PowerShell to make the change immediately, changing my site details to your own

$UserCredential = Get-Credential -UserName $adminUPN -Message "Enter password"
Connect-SPOService -URL -Credential $userCredential
Set-SPOsite -DenyAddAndCustomizePages 0

Repeat the last line for each site on which you need to quickly activate this setting. For example, I would run it again on

Your web parts should have now returned! Good luck.

One Reply to “Content and script editor web parts missing in SharePoint”

  1. Please specify what versions of SharePoint this information applies to, and more importantly, if talking about 2010, 2013 or 2016 on-premises (and probably SP Online), be sure to call out the ramifications of enabling that feature; such as it replaces the Quick Launch and Top Link Bar options with Navigation (which has a very different UI), that it adds several lists and libraries and adds a Publishing process for updating pages. Activating the SharePoint Server Publishing feature is a BIG change and hard to undo, so should not be done lightly.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.