HOW TO SAVE SITE AS A TEMPLATE
As mention above by @yash.kamdar the "Save site as a template" feature is disabled by default, to save your site as template you have to enable this feature, To enable this service follow this steps:
1.) Select site you wanted to save as template.
example: (https://ahlcloud.sharepoint.com/sites/ProjectSite)
2.) Open your powershell then (run as administor).
3.) Type this syntax on your powershell just like on the image below.
Powershell Script:
$AdminCenterURL = "https://MyTenantDomain-admin.sharepoint.com" $SiteURL = "https://MyTenantDomain.sharepoint.com/sites/myTemplate" Connect-SPOService -URL $AdminCenterURL -credential (Get-Credential) Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False Example:
While entering this code
Connect-SPOService -URL $AdminCenterURL -credential (Get-Credential)
Windows Security Credential will prompt then enter your sharepoint account .
Then enter the last syntax to enable "Save site as a template" feature.
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False 4.) Enter this link on your browser : http://MyTenantdomain.sharepoint.com/sites/MySiteTemplate/_layouts/savetmpl.aspx
Example : https://ahlcloud.sharepoint.com/sites/ProjectSite/_layouts/savetmpl.aspx
Note: If you don't follow step #3 you will receive this error when saving template using the short-link above. 
TAGS: sharepointcommandpromtpowershellfeaturestemplatepublishing
