Try our conversational search powered by Generative AI!

Maximum number of versions resets


Hi all,

I have changed "Config -> System Settings -> Maximum number of versions" few times recently from 20 to 5, but at some point it always gets back to 20. Not sure why. Tried to search the code for that setting and couldn't find anything even slightly related (or poorly searched?). Does any of you have ideas why? Shall I change it directly through DB?

Thank you!

Oct 08, 2020 8:20

I usually add it to web.config. Documentation says:

"Pages are automatically versioned in a standard installation. The uiMaxVersions attribute in the applicationSettings node in the Web.config file, defines the number of page versions that the system will keep, default value is 20."

Oct 08, 2020 8:32


Give a try by setting this in web.config.

"uiMaxVersions = 5",

    <applicationSettings globalErrorHandling="RemoteOnly" disableVersionDeletion="false" httpCacheability="Public" uiEditorCssPaths="~/Areas/Onyx/Static/css/editor.css" urlRebaseKind="ToRootRelative" pageUseBrowserLanguagePreferences="false" uiShowGlobalizationUserInterface="true" subscriptionHandler="EPiServer.Personalization.SubscriptionMail,EPiServer" uiMaxVersions="5" pageValidateTemplate="false" uiUrl="~/EPiServer/CMS/" />
Oct 08, 2020 8:36

Looks like setting this up does not automatically removes previous 15 versions. Will it later? Is there way to do it through admin panel? Or shall I develop my own scheduled job?

Oct 08, 2020 8:55

The Trim content versions scheduled job checks the Max number of versions and removes redundant versions with status Previously Published.

The job is enabled by default, and set to run daily.

Oct 08, 2020 8:55
fuji - Oct 08, 2020 8:58
True! Thanks a lot! 🙇‍♂️

Note though that it doesn't remove draft versions...these are not counted in your 15 versions...

Oct 08, 2020 8:56
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.