Introduction
To reduce memory usage and for a quicker start-up time, developers can remove unnecessary features from Sitefinity. Please note that if a page is using the blog module and if that module is later turned off, then that page will throw an exception. You should only turn off features that are not currently being used. We will see how to disable:
I. Generic Content Based Modules II. Non-Generic Content Based Modules III. Search and RSS Services I. Generic Content Based Modules
To remove the Generic Content based modules, which include the Blogs, News, Images and Documents and Events modules, you need to comment out the provider lines in the
web.config file. If the CMS does not load properly, it is highly likely that some lines have not been commented. Although this example uses the blogs module, the steps are similar for the other modules in this category:
1. Open your web.config file, which is located in the root directory of your application
2. Comment the section name for the blogs:
| <!--Disable Blogs--> |
<section name="blogs" type="Telerik.Blogs.Configuration.SectionHandler, Telerik.Blogs" requirePermission="false"/> |
3. Comment the module’s registration in the Telerik > Framework > Modules section:
| <!--Disable blogs--> |
| <add type="Telerik.Blogs.BlogsModule, Telerik.Blogs"/> |
4. Comment the blogs module provider in the CMS Engine section:
| <!--Disable blogs--> |
| <add name="Blogs" |
| urlRewriteFormat="[Publication_Date]/[Title].aspx" |
| urlDateTimeFormat="yy-MM-dd" |
| urlWhitespaceChar="_" |
| visible="False" |
| defaultMetaField="Title" |
| applicationName="/Blogs" |
| allowVersioning="True" |
| allowLocalization="True" |
| localizationProviderName="" |
| allowWorkflow="False" |
| securityProviderName="" |
| versioningProviderName="" |
| connectionStringName="GenericContentConnection" |
| type="Telerik.Blogs.Data.DefaultBlogProvider, Telerik.Blogs.Data"/> |
5. Disable the Blogs RSS Provider in the RSS section:
| <!--Disable blogs--> |
| <add name="Blogs" |
| type="Telerik.Blogs.RssProvider, Telerik.Blogs" |
| visible="True" |
| applicationName="/Blogs" |
| rssFieldAuthor="Author" |
| rssFieldTitle="Title" |
| rssFieldPubDate="Publication_Date"/> |
6. Comment all the meta fields in the meta fields section:
| <!--Disable blogs--> |
| <add key="Blogs.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/> |
| <add key="Blogs.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/> |
| <add key="Blogs.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/> |
| <add key="Blogs.BlogID" valueType="Guid" visible="False" searchable="True" sortable="True" defaultValue=""/> |
| <add key="Blogs.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/> |
| <add key="Blogs.View_Count" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue="0"/> |
7. Disable the blogs provider below the meta fields section:
| <!--Disable blogs--> |
| <blogs defaultGenericProvider="Blogs"> |
| <genericContentProviders> |
| <add providerName="Blogs" publicationDateField="Publication_Date" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" flatOwnership="True"/> |
| </genericContentProviders> |
| </blogs> |
II. Non-Generic Content Based Modules
Since these modules don’t have meta fields, these modules, which include the forums, polls and newsletter modules, require much fewer steps to remove. As an example, here’s how to turn off the
Newsletter module:
1. Open your web.config file, which is located in the root directory of your application
2. Comment the section name:
| <!--Disable Newsletter--> |
| <section name="notifications" type="Telerik.Notifications.Newsletters.Configuration.SectionHandler, Telerik.Notifications" requirePermission="false"/> |
3. Comment the module’s registration in the
Telerik > Framework > Modules section:
| <!--Disable Newsletter--> |
| <add type="Telerik.Notifications.Newsletters.NewsletterModule, Telerik.Notifications"/> |
4. Under the Telerik section, delete the module’s provider:
| <!--Disable Newsletter--> |
| <notifications defaultProvider="Notifications"> |
| <providers> |
| <clear/> |
| <add name="Notifications" type="Telerik.Notifications.Data.DefaultProvider, Telerik.Notifications.Data" connectionStringName="DefaultConnection" EnableSsl="false" MergedFields="FirstName;LastName" SendingInterval="1000"/> |
| </providers> |
| </notifications> |
III. Removing Search and RSS Services
Removing services is similar to removing modules, but the steps are slightly different. Here’s how to remove the RSS service:
1. Open your web.config file, which is located in the root directory of your application
2. Remove the section name:
| <!--Disable RSS--> |
| <section name="rss" type="Telerik.Rss.Configuration.SectionHandler, Telerik.Rss" requirePermission="false"/> |
3. Disable the RSS service registration from the
Telerik > Framework > Services section:
| <!--Disable RSS--> |
| <add type="Telerik.Rss.RssModule, Telerik.Rss"/> |
| <add type="Telerik.Rss.RssProviderService, Telerik.Rss"/> |
4. Comment the RSS Provider:
| <!--Disable RSS--> |
| <rss defaultProvider="Sitefinity"> |
| <feeds> |
| </feeds> |
| <channelProviders> |
| <clear/> |
| <add name="Page Rss Provider" type="Telerik.Cms.Web.RssChannelProvider, Telerik.Cms" settingsControl="Telerik.Cms.Web.UI.RssSettingsControl, Telerik.Cms" viewSettingsControl="Telerik.Cms.Web.UI.RssViewSettingsControl, Telerik.Cms" description="Provides RSS for CMS pages"/> |
| </channelProviders> |
| <providers> |
| <clear/> |
| <add name="Sitefinity" type="Telerik.Rss.Data.DefaultServiceProvider, Telerik.Rss.Data" connectionStringName="DefaultConnection"/> |
| </providers> |
| </rss> |
5. Disable the RSS Provider from the CMS Engine Element:
| <!--Disable RSS--> |
| <rssProviders> |
| <clear/> |
| <add name="Blogs" type="Telerik.Blogs.RssProvider, Telerik.Blogs" visible="True" applicationName="/Blogs" rssFieldAuthor="Author" rssFieldTitle="Title" rssFieldPubDate="Publication_Date"/> |
| </rssProviders> |
| Tools |
| The site exporter can be disabled by commenting one line: |
| <!--Disable Tools--> |
| <add type="Telerik.Cms.Tools.SiteExporter, Telerik.Cms"/> |
That is all. Please do not forget to backup your web.config file in case something goes wrong.