Area: Optimizely CMS
Applies to versions: 10-11

Migrating Optimizely Dynamic Content to Optimizely blocks

Recommended reading 

Optimizely Dynamic Content is a feature that allows developers to programmatically insert content into XHTML property values. Optimizely Dynamic Content is installed via the optional NuGet package EPiServer.DynamicContent. However, the feature is now deprecated and is not supported by Optimizely TinyMCE v 2. It is therefore recommended that you use blocks instead.

If your site is using Dynamic Content, you can use the procedures in this topic to migrate from Dynamic Content to blocks.


  1. Identify and iterate the items that use dynamic content.
  2. Get the original content saved by the dynamic content control and extract the content for migration.
  3. Create a new block to render the Dynamic Content control.
  4. Create a block to replace the Dynamic Content control at the page level.
  5. Update the XHTML string property.


You can find a working solution on our GitHub on the branch doc/migrating-dynamic-content.

Just clone our repository, check out that branch and run as described in the Readme file. The approach defined above is implemented as a scheduled job. All it does is identifying all instances of FooDynamicContent and rewriting them to instances of FooBlock.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Jun 14, 2021

Recommended reading