How to disable the Sample Site

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable the Sample Site

resplin
Intermediate
5 2 3,859

By default, during its first bootstrap Alfresco Content Services will load a sample site, called "Sample: Web Site Design Project" (swsdp).

The easy way to disable loading the sample site and users is to add a property in alfresco-global.properties before starting the repository for the first time:

sample.site.disabled=true

That is the recommended solution. An alternate approach is to disable the sample site by overriding the patch service before the first run of the repository. Load a file with the following contents at [ALF_HOME]/tomcat/shared/classes/alfresco/extension/site-bootstrap-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Disable loading the Sample Site -->
<!-- Put this file at [ALF_HOME]/tomcat/shared/classes/alfresco/extension/site-bootstrap-context.xml -->
<bean id="patch.siteLoadPatch.swsdp" class="org.alfresco.repo.admin.patch.impl.SiteLoadPatch" parent="basePatch">
<property name="id"><value>patch.siteLoadPatch.swsdp</value></property>
<property name="description"><value>patch.siteLoadPatch.description</value></property>
<property name="disabled"><value>true</value></property>
</bean>
</beans>
2 Comments
douglascrp
Advanced II

There is no real need to do that.

All one has to do is to put one simple property inside alfresco-global.properties:

#
# Disable load of sample site. Set to false if you want to boostrap sample site and users.
#
sample.site.disabled=true

resplin
Intermediate

Thank you Douglas! I knew that there was an easy way to do this, but I couldn't find it when I needed it. I was a bit shocked that it wasn't documented anywhere obvious, but with your hint I can find it in the JMX properties. Hopefully this page should be useful to other people who need this tip until we get the official docs updated.