|
| 1 | +--- |
| 2 | +description: >- |
| 3 | + This article will help you migrate content to Umbraco 15, and outline options to skip this content migration |
| 4 | +--- |
| 5 | + |
| 6 | +# Migrate content to Umbraco 15 |
| 7 | + |
| 8 | +Umbraco 15 changes the internal data format of all [Block Editors](../../../../fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/README.md). |
| 9 | + |
| 10 | +If you maintain a large Umbraco site with extensive Block Editor usage, the upgrade to Umbraco 15+ might require a long-running content migration. For the duration of the migration, your site will be unresponsive and unable to serve requests. |
| 11 | + |
| 12 | +You can track the progress of the migration in the logs. |
| 13 | + |
| 14 | +It is advised to [clean up old content versions](../../../../fundamentals/data/content-version-cleanup.md) before upgrading. This will make the migration run faster. |
| 15 | + |
| 16 | +## Opting out of the content migration |
| 17 | + |
| 18 | +It is strongly recommended to let the migration run as part of the upgrade. However, if you are upgrading to Umbraco versions 15, 16, or 17, you _can_ opt out of the migration. Your site will continue to work, albeit with a certain degree of performance degradation. |
| 19 | + |
| 20 | +{% hint style="warning" %} |
| 21 | +Blocks in Rich Text Editors might not work as expected if you opt out of the content migration. |
| 22 | +{% endhint %} |
| 23 | + |
| 24 | +You can opt out of migrating each Block Editor type individually. To opt-out, add an `IComposer` implementation to configure the `ConvertBlockEditorPropertiesOptions` before initiating the upgrade process: |
| 25 | + |
| 26 | +{% code title="DisableBlockEditorMigrationComposer.cs" %} |
| 27 | + |
| 28 | +```csharp |
| 29 | +using Umbraco.Cms.Core.Composing; |
| 30 | +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0; |
| 31 | + |
| 32 | +namespace UmbracoDocs.Samples; |
| 33 | + |
| 34 | +public class DisableBlockEditorMigrationComposer : IComposer |
| 35 | +{ |
| 36 | + [Obsolete] |
| 37 | + public void Compose(IUmbracoBuilder builder) |
| 38 | + => builder.Services.Configure<ConvertBlockEditorPropertiesOptions>(options => |
| 39 | + { |
| 40 | + // setting this to true will skip the migration of all Block List properties |
| 41 | + options.SkipBlockListEditors = false; |
| 42 | + |
| 43 | + // setting this to true will skip the migration of all Block Grid properties |
| 44 | + options.SkipBlockGridEditors = false; |
| 45 | + |
| 46 | + // setting this to true will skip the migration of all Rich Text Editor properties |
| 47 | + options.SkipRichTextEditors = false; |
| 48 | + }); |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +{% endcode %} |
| 53 | + |
| 54 | +Subsequently, you are responsible for performing the content migration yourself. This _must_ be done before upgrading past Umbraco 17. |
| 55 | + |
| 56 | +Custom code is required to perform the content migration. You can find inspiration in the core migrations: |
| 57 | + |
| 58 | +- [`ConvertBlockListEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockListEditorProperties.cs) for Block List properties. |
| 59 | +- [`ConvertBlockGridEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockGridEditorProperties.cs) for Block Grid properties. |
| 60 | +- [`ConvertRichTextEditorProperties`](https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertRichTextEditorProperties.cs) for Rich Text Editor properties. |
| 61 | + |
| 62 | +{% hint style="warning" %} |
| 63 | +This custom code should not run while editors are working in the Umbraco backoffice. |
| 64 | + |
| 65 | +The site may require a restart once the content migration is complete. |
| 66 | +{% endhint %} |
0 commit comments