> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-cloud/optimize-and-maintain-your-site/manage-product-upgrades/product-upgrades/version-specific-upgrades/migrate-from-umbraco-7-to-8.md).

# Migrate from Umbraco 7 to Umbraco 8 Locally

Taking your Umbraco CMS project from Umbraco 7 to 8 is called a migration as it requires that the data is migrated in the process. This article covers each step involved in this process.

Read the [Migrate Content to Umbraco 8 article](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/upgrading/version-specific/migrate-content-to-umbraco-8#what-are-the-limitations) to learn more about limitations and things related to migrating your Umbraco site from 7 to 8.

{% hint style="warning" %}
It is no longer possible to create a new Umbraco 8 project directly in the Umbraco Cloud portal. This article only covers migrating a project from Umbraco 7 to Umbraco 8 locally. Depending on your goal, choose one of the following paths:

* **Migrate and upgrade locally, then deploy:** Follow this guide to migrate the Umbraco 7 project to Umbraco 8 on a local setup. Once the site runs on Umbraco 8 locally, continue through the [upgrade path to a supported version locally](https://docs.umbraco.com/umbraco-cloud/optimize-and-maintain-your-site/manage-product-upgrades/product-upgrades/version-specific-upgrades/migrate-from-8-to-latest). Only then create the Umbraco Cloud project and deploy to it.
* **Rebuild on a new version:** If you're rebuilding the site on a new version and only want to carry over content and schema, use the [Import/Export](https://docs.umbraco.com/umbraco-deploy/deployment-workflow/import-export/import-export-v7) guide. This only migrates entities that Deploy supports, so custom database tables and Umbraco Forms entries are not included, and only draft and published content versions carry over, not full version history.
  {% endhint %}

## Video tutorial

You can find the full playlist here: [Migrate an Umbraco Cloud project from 7 to 8](https://www.youtube.com/playlist?list=PLgX62vUaGZsGceCXveMkprlDV5a3K94db)

{% hint style="info" %}
The video tutorial was recorded when Umbraco 8 projects could still be created directly in the Cloud portal. The overall migration steps still apply, but set up the Umbraco 8 project locally as described below.
{% endhint %}

## Prerequisites

* A Umbraco 7 Cloud project running **the latest version of Umbraco 7**.
* Make sure Umbraco Forms data is not handled as content.
  * See [Umbraco Forms on Cloud](/umbraco-cloud/expand-your-projects-capabilities/cloud-extensions/umbraco-forms-on-cloud.md#how-forms-are-handled-on-umbraco-cloud) for more details on how to check the setting.
* A local [Umbraco 8](https://www.nuget.org/packages/UmbracoCms/) project running the latest version of Umbraco 8.

## Step 1: Content migration

1. Clone down the Umbraco 7 Cloud project.
2. Run the project locally and **restore** Content and Media.
3. Set up a [Umbraco 8](https://www.nuget.org/packages/UmbracoCms/) project locally.
4. Install the [ProWorks Umbraco 8 Migrations](https://www.nuget.org/packages/ProWorks.Umbraco8.Migrations) community package on the local Umbraco 8 site.
5. Copy `~/App_Data/Umbraco.sdf` or `~/App_Data/Umbraco.mdf` from the cloned Umbraco 7 project.
6. Paste the file into `~/App_Data` on the local Umbraco 8 project.
7. Open `web.config` from the Umbraco 8 project.
8. Locate the `Umbraco.Core.ConfigurationStatus` key.
9. Replace the value with the version your Umbraco 7 project is running.
10. Run the Umbraco 8 project locally.
11. Authorize the migration. Cloud credentials are used for this.

![Authorize upgrade](/files/A2qREOi8T0EVTpWDZt24)

12. Click **Continue** to start the migration.
13. Log in to the backoffice and verify that everything is there once the migration is complete.

{% hint style="info" %}
If your login does not work, try the following approach:

Copy the `UsersMembershipProvider` attributes from your Umbraco 7 `web.config` file to the Umbraco 8 `web.config` file. Once you've done this, try to login again.

Below is an example of how the attribute can look:

```xml
<add name="UsersMembershipProvider" 
     type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco" 
     minRequiredNonalphanumericCharacters="0" 
     minRequiredPasswordLength="8" 
     useLegacyEncoding="true" 
     enablePasswordRetrieval="false" 
     enablePasswordReset="true" 
     requiresQuestionAndAnswer="false" 
     passwordFormat="Hashed" />
```

{% endhint %}

{% hint style="info" %}
This is **only a content migration**. The database will be migrated, but updating view files, custom code, and implementation is a manual process.

See [Step 3](#step-3-setup-custom-code-for-umbraco-8) of this guide, for more details.
{% endhint %}

## Step 2: Files migration

Before moving on to the next step, make sure that the Umbraco 8 project is no longer running.

The following files/folders need to be copied into the Umbraco 8 project:

* `~/Views` - Do **not** overwrite the default Macro and Partial View Macro files, unless changes have been made to these.
* `~/Media`.
* Any files/folders related to Stylesheets and JavaScripts.
* Any custom files/folders the Umbraco 7 project uses, that aren't in the `~/Config` or `~/bin`.
* `~/App_Data/UmbracoForms` - In case, Umbraco Forms was used on the Umbraco 7 site.

Merge the configuration files carefully to ensure any custom settings are migrated while none of the default configurations for Umbraco 8 is overwritten.

### Generating UDA files

1. Run the Umbraco 8 project locally.
   * It **will** give you an error on the frontend as none of the Template files have been updated yet.
2. Open the command line tool in the `~/data` folder on the Umbraco 8 project.
3. Generate UDA files by running the command: `echo > deploy-export`.
   * Once a `deploy-complete` marker is added to the `~/data` folder, it is done.
4. Check `~/data/revision` to ensure all the UDA files have been generated.
5. Run `echo > deploy` in the `~/data` folder to make sure everything checks out with the UDA files that were generated.

Running the `echo > deploy` command will generate a new marker. Move forward with the migration based on the marker:

* `deploy-failed`
  * Something failed during the check.
  * Run `echo > deploy-clearsignatures` followed by `echo > deploy` to clear up the error.
* `deploy-complete`
  * Everything checks out. Move on to the next step.

## Step 3: Setup custom code for Umbraco 8

Umbraco 8 is different from Umbraco 7 in many ways. This means that in this step, all custom code, controllers, and models need to be reviewed and rewritten for Umbraco 8.

### Example of changes that need to be made

One of the changes made, is how published content is rendered through Template files. Due to this, it will be necessary to update **all** Template files (`.cshtml`) to reflect these changes.

Read more about these changes in the [IPublishedContent section of the Documentation](https://docs.umbraco.com/umbraco-cms/reference/querying/ipublishedcontent).

* Template files need to inherit from `Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.HomePage>` instead of `Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.HomePage>`.
* Template files need to use `ContentModels = Umbraco.Web.PublishedModels` instead of `ContentModels = Umbraco.Web.PublishedContentModels`.
* `@Model.Value("propertyAlias")` replaces `@Umbraco.Field("propertyAlias")`.
* `@Model.PropertyAlias` replaces `@Model.Content.PropertyAlias`.
* `@Model.Value<IPublishedContent>("propertyAlias")` replaces `Model.Content.GetPropertyValue<IPublishedContent>("propertyAlias")`.

Depending on the size of the project and the amount of custom code and implementations, this step is going to require a lot of work.

## Continuing after the migration

At this point, the project runs on Umbraco 8 locally. Umbraco 8 is no longer a supported version, and cannot be deployed to Umbraco Cloud yet.

To deploy the project to Umbraco Cloud, follow the [upgrade path to a supported version locally](https://docs.umbraco.com/umbraco-cloud/optimize-and-maintain-your-site/manage-product-upgrades/product-upgrades/version-specific-upgrades/migrate-from-8-to-latest).

## Related information

* [Content Migration for Umbraco CMS - 7 to 8](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/upgrading/version-specific/migrate-content-to-umbraco-8)
* [Issue tracker for known issues with Content Migration](https://github.com/umbraco/UmbracoDocs/issues)
* [Forms on Umbraco Cloud](/umbraco-cloud/expand-your-projects-capabilities/cloud-extensions/umbraco-forms-on-cloud.md)
* [Working locally with Umbraco Cloud](/umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/working-locally.md)
* [KUDU on Umbraco Cloud](/umbraco-cloud/optimize-and-maintain-your-site/monitor-and-troubleshoot/power-tools.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/umbraco-cloud/optimize-and-maintain-your-site/manage-product-upgrades/product-upgrades/version-specific-upgrades/migrate-from-umbraco-7-to-8.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
